helloitsme2
helloitsme2

Reputation: 101

PayPal Buttons in Flutter Web with a Node SDK

I am looking for a way to add PayPal buttons in Flutter Web. Since I am not very smart I only could add those from html code, but it is only redirection.

I need to use JavaScript PayPal buttons or gateway (I tried to integrate from one tutorial with this: https://github.com/paypal/PayPal-node-SDK but got the error 'invalid payerID'

Upvotes: 0

Views: 1190

Answers (1)

Preston PHX
Preston PHX

Reputation: 30457

https://github.com/paypal/PayPal-node-SDK

That SDK is deprecated and uses the deprecated v1/payments API.

If you need a server SDK for checkout, use Checkout-NodeJS-SDK

You'll need two routes on your server, one for 'Create Order' and one for 'Capture Order', documented here. These routes should return JSON, and the latter should check the response from PayPal and do any important success/failure operations that need to happen server-side.

The approval flow to pair with the two routes is https://developer.paypal.com/demo/checkout/#/pattern/server

Upvotes: 1

Related Questions