I found that the shipping and tax are not added to a transaction until the review screen is shown. How can I get the total value of the transaction earlier in the checkout process? I use payment methods (User Points, PayPal) that need to check the total when the payment method has been chosen from the payment screen.

Comments

darren oh’s picture

Marked issue 70905 as a duplicate of this issue.

darren oh’s picture

Title: Need to Get Full Transaction Cost Before Review Screen » Need to Get Full Transaction Cost Before Payment Method Screen

I'm changing the title since I realized that allowing the checkout screens to be arranged so that the payment screen comes after the review screen would be another way to solve the problem.

This issue prevents transactions that include shipping or tax from being successfully processed with the paypalpro or paypalpro_express modules. (See comment #23 in issue 64456.) Since the paypal module successfully processes such transactions, I studied the code to see how it calculates the transaction total but discovered that it just passes the amount for each item to paypal and lets PayPal calculate the total.

darren oh’s picture

Category: support » feature

Since no one has suggested how this might be accomplished without adding new features, I'm changing this to a feature request.

rkerr’s picture

It might be possible to hook into ... transactionapi? ... and actually provide separate screens for shipping and tax module. I was looking into this for 4.6 recently, because I need to do location-based shipping yet the default taxapi doesn't give access to the transaction object.

neclimdul’s picture

Component: cart.module » payment

Couple comments
1) This is not possible for paypal. They don't expect you to have the final amount. If you are collecting shipping information to calculate shipping charges before paypalpro for example you are breaking paypal's business rules. Express checkout requires you to not take any personal information about the user durring checkout. You have to get this from paypal who will get shipping address etc. The docs are long and I don't have the reference but I'm pretty sure they give you leway on the final charge to allow for this though I don't know how much.

2) Putting screens after the review screen doesn't make sense. The review screen is where the user should be reviewing and agreeing to all changes.

3) store_transaction_calc_gross($txn) is the proper way to estimate the costs. Shipping will not be accounted for in this since we haven't passed this screen.

So, to me things are working as intended. One possible way to possibly improve the estimate would be to have an api call. This would allow shipping to give an estimated shipping (it has to be at least $15 for these items or something so go ahead and add it). However this would have to be done without repeating work done to the transaction which is sticky business.

darren oh’s picture

It appears that this feature is not actually necessary unless the buyer is using a payment method that requires the site to calculate whether the buyer has sufficient funds for the purchase. Examples would be purchases with user points or coupons. I guess we could check after the user submits the order, but it's less convenient to the user.

sime’s picture

Status: Active » Closed (won't fix)

stalemate?