$chiubaca / notes / fleeting / 2022-04-25
  • Starting to understand the PayPal SDK a bit better… cross referencing between three different packages is very confusing react-paypal <-> paypal-js <-> PayPal JS SDK <-> PayPal REST API
  • The React package has been OK to use so far, the PayPalButtons components have 1-to-1 mapping to to the paypal-js package so far, except I’ve had lots of problems trying to get the onShippingChange to patch the PayPal order in order to cross check Printful for shipping estimations.
    • going to have to do this a different way. 1) collect the users billing and shipping address upfront, 2) send these details to PayPal via onShippingChange callback.
    • Yes this means more to code, but also means it should make this feature ready for Stripe integration later down the line.
Edit on GitHub ✏️

Hey I'm Alex Chiu 👋. These are my notes for literally anything.

I'm using the Zettelkasten method to organise my thoughts here.

My more polished writings are published to my main blog at chiubaca.com

Follow me on: Github / X (Twitter) / Mastodon / LinkedIn