Bug with negative amounts in PayPal API -


i'm trying use negative amount paypal adaptive payments api. start with, seems work:

    'item' => [       {         'itemprice' => '25.00',         'name' => 'cryptex - 16gb usb drive',         'price' => '25',         'itemcount' => 1       },       {         'quantity' => 1,         'name' => 'special discount',         'price' => '-2.50'       },       {         'itemprice' => '5.00',         'name' => 'shipping',         'price' => '5.00',         'itemcount' => 1       }     ] 

here example of see after submitting json, , updating items:

enter image description here

as can see, price is correct ... yet there no sign of discounted amount? taking account - otherwise price have been £30, not £27.50 (which after £2.50 discount)

what gives? bug in paypals system?

fwiw, emails broken - don't show discount amount @ all.

update: i've opened ticket paypal tech support, i'm pretty sure bug system, , not can fixed end :( damn annoying!

update 2: reply paypal:

paypal adaptive payments not support negative item values. since did not pass <itemprice> in api call, system did not throw following error message:

[errorid] => 580022 [domain] => platform [subdomain] => application [severity] => error [category] => application [message] => invalid request parameter: itemprice cannot negative 

i can see following submitted paypal:

<item> <name>special discount</name> <identifier></identifier> <price>-2.50</price> <itemprice></itemprice> <itemcount></itemcount> <any>[quantity: null]</any> </item> 

this object incomplete , in order apply discounts, should apply them > onto price main item , submit paypal.

i'm not sure they're suggestion do? example cart, be:

item 1 -  £10  item 2 -  £20  item 3 -  £50  item 4 -  £10  delivery - £5 total   -  £95  

as encouragement, offer coupons... "£10 off orders on £50". in above case above, drop overall price £85.

i'm not sure suggesting alternative?

interesting. normal payments don't have restriction (i pass negative amount item describe on frequent basis).

what they're telling take discount off item. example cart discount be

item 1 -  £10  item 2 -  £20  item 3 -  £40 <-- removed £10 discount item 4 -  £10  delivery - £5 total   -  £85 <-- total reflects 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -