close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


PayPal transaction fails when discount code is used

Thread began 9/20/2012 10:23 pm by robvoigt9434728 | Last modified 9/24/2012 4:15 pm by Jason Byrnes | 647 views | 3 replies |


PayPal transaction fails when discount code is used

I have determined that a PayPal transaction fails when a discount code is used in my cart.

Paypal transactions are working fine when no discount is used in the cart. Also my local checkouts are working fine when a discount is used or not.

So, have you heard of this issue before? PayPal transaction fails when discount code is used in the cart and transaction. As soon as I hit the Check out with PayPal button on the checkout.php page, the session redirects to the pp_checkout_failure.php page. If I click back on the cart, the item remains in the cart.

If so would you have a suggestion as to where I can correct this?

Thanks again in advance.

Sign in to reply to this post

Jason ByrnesWebAssist

How is the discount defined?

I would think that the discount is producing a price that has more than 2 decimal places.

on the checkout page, the code that passes the amount to paypal would look like this:

$WA_PP_ECO_Do_itemized[0][$nextIndex] = "Amount" . strval($cartIndex+1) . "";
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Price") ."";

you can use number_format to force that to 2 decimal places:
$WA_PP_ECO_Do_itemized[0][$nextIndex] = "Amount" . strval($cartIndex+1) . "";
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".number_format($eCart1->DisplayInfo("Price"), 2) ."";

Sign in to reply to this post


I changed that code but PayPal still fails.

The discounts are set up in my eCart Object and I have created form field and submit button to use the discount codes. Attached is a snapshot of the eCart discount window.

This is a flat discount amount so not sure about the 2 decimal places...

I have two other discounts that are 10% and 20% off. Those fail as well.

Any other idea?

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...