Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coupon Code For Paypal Express Checkout

I'm using Paypal Express Checkout system on my website. But I want to put a coupon (discount) code area. It will make a reduction if code is true. (Like GoDaddy.com's cart system)

Have you any idea, where should I start for this?

(I'm not using any eCommerce framework)

like image 392
Eray Avatar asked Feb 27 '11 15:02

Eray


People also ask

Can you use coupon codes with PayPal?

Make sure you pay for your item before the coupon expiration date, and simply enter your coupon code at the check-out. During check-out, select PayPal as your payment method. If you want to make sure that your coupon code was applied to the item, look through your PayPal account statement after the transaction.

How do I create a coupon code in PayPal?

Log in to your PayPal account account. Go to "Merchant Services" and select "Create Buttons for Your Website." If you're adding a discount to a button that's already on your website, choose "My Saved Buttons" from the right-side "Tools and Settings" pane.


1 Answers

I know this is an old thread but wanted to put here my experience for others looking for the same thing, and maybe this did not apply then but it does apply now, at least on the sandbox meaning I have not tested this in a real transaction

When adding items that you send to paypal you basically send this

L_PAYMENTREQUEST_0_QTY0 = 1

L_PAYMENTREQUEST_0_AMT0 = 1.00

L_PAYMENTREQUEST_0_NAME0 = my item 0 name

L_PAYMENTREQUEST_0_NUMBER0 = myitem0id

Then we add another item

L_PAYMENTREQUEST_0_QTY1 = 1

L_PAYMENTREQUEST_0_AMT1 = 1.00

L_PAYMENTREQUEST_0_NAME1 = my item 1 name

L_PAYMENTREQUEST_0_NUMBER1 = myitem1id

And now we add the coupon

L_PAYMENTREQUEST_0_QTY2 = 1

L_PAYMENTREQUEST_0_AMT2 = -0.50

L_PAYMENTREQUEST_0_NAME2 = my coupon name

L_PAYMENTREQUEST_0_NUMBER2 = mycouponcode

And then we add the subtotal and total values

PAYMENTREQUEST_0_AMT = 1.50

AMT = 1.50

What I think paypal does is ads up all item totals so it would do for this order something like

1.00+1.00-0.50 = 1.50

Then compares it to your total amounts

if they match then it is a go, the customer sees this as an extra item, but obviously with the minus sign, this picture below is from a paypal sandbox express checkout transaction

Paypal express checkout transaction with coupon code

like image 130
Tlacaelel Ramon Luis Avatar answered Oct 23 '22 23:10

Tlacaelel Ramon Luis