paypal / here-sideloader-api-samples

Sideloader API samples that enable to integrate PayPal Here into other apps
Other
24 stars 32 forks source link

v2 transaction crashes if "number" field is not included in the invoice. #45

Closed kfujino7 closed 7 years ago

kfujino7 commented 8 years ago

I'm currently migrating my app (android) to use v2 endpoint from v1. Looking following URL, the "number" field in the invoice is optional and it was working on v1 without it. https://developer.paypal.com/webapps/developer/docs/classic/api/invoicing/CreateInvoice_API_Operation/

However if I just changed my access url from "paypalhere://takePayment" to "paypalhere://takePayment/v2?", then on the payment process on PayPal Here app, process the payment > "Payment Complete" > "No receipt" > tap the "You're all done" then the app crashes. The PayPal Here app version is 2.6.2. No further log is logged in logcat.

If I add "number" with any unique value, the payment the transaction finishes and the process is back to my app on where I specified in returnUrl.

Working with v1 but crashes with v2 invoice : {"paymentTerms":"DueOnReceipt","discountPercent":"0","currencyCode":"AUD","merchantEmail":"xxx@xxxx.xxx","itemList":{"item":[{"name":"Goods","unitPrice":"15.0","quantity":"1"}]}}

Working both with v1 and v2 invoice : {"paymentTerms":"DueOnReceipt","discountPercent":"0","currencyCode":"AUD","merchantEmail":"xxx@xxxx.xxx","number":"999","itemList":{"item":[{"name":"Goods","unitPrice":"15.0","quantity":"1"}]}}

kfujino7 commented 7 years ago

Tested with PayPal Here 2.8.3. The payment went through successfully with or without "number" field.