As far as I can tell, Paypal does not provide discount codes. It requires additional scripts, and though I found various script info, I do not know how to add this information to your brilliant code. I just want to be able to offer 20% off someone’s entire cart order. Which I think would be:
discount_amount_cart=20
discount_rate_cart=20
__________________________________________
In the past one method used to apply a Discount and/or Coupon was through the use of a custom script which did all the calculations and passed the results to PayPal.
Now this task is quite a bit easier whereas you can use the Discount Variables directly in your item button code.
You can also offer Promo Coupon Codes by combining the Item Code Discount Variables with some custom scripting. There are examples of how this can be done below.
Here's some important stuff to be aware of. The Discount Variables listed below are intended to work with Buy Now Buttons and Add to Cart Buttons. They only apply to the item they are associated with, "not" the entire shopping cart. This means that you can "only" apply a Discount to an individual item and they do not apply to Taxes or Shipping.
discount_amount
discount_amount2
discount_rate
discount_rate2
discount_num
Tip: To use the Item Code Discount Variables with "hosted" or "encrypted" item button code, you need to modify button code using the "Advanced Variables" in Step 3 of the online button creation process. Look for the text box near the bottom of the page. There you can insert extra variables. For example, you want to offer your customers a 10% discount on one particular item regardless of the quantity of that particular item. Simply insert the "discount_rate" and "discount_rate2" variables in the text box. Just enter:
discount_rate=10
discount_rate2=10
There's no HTML extras, just the name of the variable, an equal sign and the value.
The following Discount Variables will only work with the "Upload" Method.
discount_amount_cart - Applies to entire cart. **
discount_amount_x - Applies only to the individual item.
discount_rate_cart - Applies to entire cart. **
discount_rate_x - Applies only to the individual item.
** Note: These variables will be ignored if you are including any individual sales tax amount or rate in your upload code. This is because the sales tax needs to be calculated after the discount is applied to your items therefore, the discount is applied to the item Subtotal, not the Total. In addition, the discount does not apply Shipping.
Thanks for any hints you might have.