Discount with PayPal REST API - paypal

When submitting a payment via PayPal's REST API a collection of Items must be provided where the price * quantity = total.
The following screen grab from Fiddler illustrates my problem:
The value for the "price" element must be in the format "0.00". However, in the case above I started with a price for loose photos of "£0.08" then added 20% VAT to give "£0.096". 300 * £0.096 is £28.80, so the total cost of the order is given correctly. Problem is, I have no way to present the unit cost to PayPal. Could anyone please advise how to solve this problem?

I had similar issues with shipping options and chose to write my own shopping cart code which displays individual items selected plus tax and shipping options. A 'pay using PayPal' button on the form simply submits the total price to PayPal. This gives me total flexibility - I recently switched to free shipping on orders over $x. Also the shopping cart is much faster and responsive than using Paypal for every item selected - so I get more orders going through to completion - always a good thing!

Related

PayPal buy now / shopping cart with and without postage assistance

I am looking for assistance with multiple buttons on a page, some which have postage and nultiple items, some without or free postage.
At present i have a standard shopping cart option on a page created from the standard create button PayPal page, which provides a space for the buyer to type in their requirements with includes free postage and works fine.
A second shopping cart on the same page offers a similar buyer feature but adds postage, all works fine.
Third, fourth and fifth buying options are single buy now buttons each with added postage.
But the problem for the buyer is that when they a add a single item with postage and a multi-buy shopping cart option, they end up with duplicate postage...
If they buy 2 single items using the buy now buttons + a multi-buy they end up having three duplicate postage costs in their order.
Any suggestions welcomed to avoid duplication of postage costs, thanks.
I'm not sure how you currently have the shipping set up (whether via the buttons themselves or the shipping profile), but this is how I would tackle this:
For the items that are free shipping, within the shipping option in the button itself I would set a shipping cost of 0.00. Then set up the shipping calculations section in Tools or your Profile for your shipping rates for the items that do have shipping costs. In the last step of the shipping calculations creation, you want the box to be checked to use the shipping cost in the transaction instead of your calculator settings and that will allow the buttons you have a shipping cost entered directly into to override the shipping costs you set in the shipping calculator.
If you need any assistance setting up the shipping calculator you may call into PayPal Support and they can assist you.

Query paypal stock management to show on my website for customers

Is it possible to have an active automatic stock counter on my website (for each item drop down box), that queries from my paypal button's stock inventory?
So if someone buys, the stock counter for that particular item goes down automatically, like it does on paypal's end. But I want it to be shown on my website for my customers to see how much stock is actually left. Is this possible with paypal?
I'd check the BMGetButtonDetails API and see if it'll provide it for you.

PayPal IPN discount variable

I am using PayPal IPN to process payments on my website. I would like the user to be able to enter a discount code and the value (amount or percentage) passed through to PayPal and calculated.
I have been looking around the web but can only seem to find the following:
Use discount_amount_cart to charge a single discount amount for the entire cart.
Use discount_amount_x to set a discount amount associated with item x
Use discount_rate_cart to charge a single discount percentage for the entire cart.
discount_rate_cart - Applies to entire cart however, this variable will only work with the "Upload" Method. Not the standard Add to Cart variables.
After testing these out in my request string:
...&discount_amount_cart=10&...
PayPal doesn't seem to recognise this discount. Does this actually exist any more in PayPal IPN?
thanks for your help!
Yes you can!!!
Here is a full list of Paypal Variables, and the associated documentation.
Ive just used discount_amount_cart myself!
https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#id08A6HH0D0TA
No ! PayPal doesnt offer any discounts, you need to manually calculate discount in your application & send it to paypal. I have developed a Ruby on Rails application that calculates Billing information using Stripe & PayPal. By the way which language are you programming in ? So that i can help you more on how to go for it.

Manipulating txn_id in shopping cart for receiving Paypal IPN

My shopping cart for a ski lessons website works as follows:
A customer selects dates that they want ski lessons on. Some dates have different prices, for example school holidays and weekends. They submit the selected dates, and the event and its details is provisionally logged in an SQL table with a random transaction ID.
The shopping cart has also added up the cost of all the selected dates and creates a Paypal Advanced Buy Now Button with the price.
The customer pays for their selected ski lessons Paypal which sends an IPN back to my IPN listener for verification and to confirm the order.
There's a problem with this though, my IPN script only knows how to verify for a static price, and since every order will have a difference price depending on selection, I need to relate the received IPN to the specific order that was originally placed.
After some poking around I wondered if it is possible to manipulate the txn_id to be the same as the random transaction ID set in the first step above. That way when the IPN report comes back the script will know know exactly which event it is referring to and I can compare the details of that event (e.g. the amount paid compared to the amount calculated_ to the variables returned in the IPN report.
Is it possible to manipulate the txn_id, or otherwise send a different identifier with the Paypal button so that I can identify the payment?
It's possible to send the identifier in the "invoice" field, which PayPal will send back in the IPN.

Can we subtract a value to the total amount of a payment in zen cart?

I have a zencart web site in which I need to subtract some amount from the total value of the payment befor going to the paypal site to pay it. Can I do that in zen cart?
Is there any plug in for that?
Take a look at Group Discounts - this shows you how to reduce the total value of the cart by a percentage for certain groups; you could base your price reduction on this module.