Luehang / react-paypal-button-v2

An easy and simple to use React button component to implement PayPal Checkout with Smart Payment Buttons V2 (Version 2).
https://luehangs.site/lue_hang/projects/react-paypal-button-v2
MIT License
274 stars 81 forks source link

How do you verify the amount with a server in the createOrder method? #110

Open jrhager84 opened 3 years ago

jrhager84 commented 3 years ago

To Do First

Ask your Question I'm trying to set up the buttons to verify amounts and coupons server-side before processing the Paypal payment to avoid price manipulation. How do I call my server to verify funds to return a success/fail for onApprove?

Tags authorize, payment server, server, onApprove, createOrder

eliasto commented 3 years ago

You can use paypal webhooks, and then verify the amount by fetching your api/database.