Reputation: 216
We currently have a system in place to process PayPal payments. It is done using the Express Checkout API. The method DoAuthorization accepts a 17 char TransactionID as a parameter.
I'm trying to implement the new PayPal Smart Payment Buttons API. I have the flow programmed with the intent=AUTHORIZE but I can only grab the Authorization ID and Order ID (both 17 char values) from the Auth response once its completed.
When I try and authorize the order and pass one of the 2 values into the DoAuthorization method, returns with an error: TransactionID invalid (10609).
My question is it possible to use the Smart Payments API Authorization ID and Order ID and pass it into the Express Checkout DoAuthorization method and still make the 2 systems work?
Could it be possible that I'm getting the 10609 error because the intent=Authorize already authorizes the order and I need to call the DoCapture method?
Upvotes: 1
Views: 101
Reputation: 30359
It is possible to use the SPB user interface, but not its API (actually it's built on the v2/orders REST API)
You can't mix v2/order API payment setups, with classic captures.
So, so long as you are using classic API calls to capture (this is a very unfortunate requirement that I would advise eliminating ASAP, but it's in your question) -- then, you need to also keep using classic API calls to set up the payment.
See the server demo pattern: https://developer.paypal.com/demo/checkout/#/pattern/server
The createOrder
portion will do an XHR fetch to your server, which will then call the classic SetExpressCheckout
and return an EC token. SPB will use the classic EC token, but show its new UI.
Upvotes: 1