onShippingChange clarity
See original GitHub issueThis is a follow up to #470
In that issue, @crookedneighbor mentioned that actions.order.patch([
would not work in the onShippingChange
callback. However, with limited testing, I was able to get it to work just fine as far as representing the change within the paypal modal popup. So, I’m not sure if I’m misunderstanding here (perhaps it appears to work fine, but in some production mode, or on the braintree side, it doesn’t work?), or if there is more to understand here?
The desired use case is to have the paypal modal be able to:
- change shippingOptions based on addressChange
- change
amount
(total) based on selected shippingOptions due to changes in tax and shipping * charges
Is this possible?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:31 (11 by maintainers)
Top Results From Across the Web
Listen for Shipping Changes
PayPal calls your onShippingChange function when: The buyer initially logs into their account (if the buyer already has a PayPal account). The buyer...
Read more >braintree
braintree ; SDK version · 3.73.1 ; Environment · Sandbox ; onShippingChange clarity $ 0 · In that issue, @crookedneighbor mentioned that actions.order.patch([...
Read more >Response Checking - Clarity Book
Since responses are meant to indicate the success or failure of an action, they cannot be left dangling. Checking the response simply means...
Read more >Issues · braintree/braintree-web · GitHub
onShippingChange clarity. #472 opened Oct 28, 2019 by 719media · 28 · Script size v4 Issues that require a major version bump to...
Read more >paypal-checkout/CHANGELOG.md
206, * feat(callback-api): Adding `onShippingChange` callback prop (#766) ... 2554, * Update docs for clarity ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jortizsao I have noticed the same. The following does not currently work, but here is where I’m at:
In
createOrder
, if I sidestep Braintree and useactions.order.create({...})
instead ofinstance.createPayment({...})
, I’m able to load a PayPal modal with its expected functionality (including correct behavior foronShippingChange
).Next, I attempt to authorize the order, hooking into Braintree
instance.tokenizePayment
to obtain a payment method nonce:Unfortunately, running
gateway.transaction.sale()
on the backend using the nonce generated bytokenizePayment
returns an error 82901. Perhaps I need to includefacilitatorAccessToken
in some form.TL;DR:
actions.order.create
is part of Orders API v2 (slight edit to language here)onShippingChange
sorta works, but shipping won’t be added to the line item total on first modal load, and changing shipping option triggers aPATCH
error.@crookedneighbor any updates here? It does seem very strange/unexpected/baffling that the new paypal v2 has been out for almost 4 years now, and braintree, the company we went with specifically for their first-party paypal support, still doesn’t support it. I mean no offense, I’m just surprised that this hasn’t been a higher initiative. Perhaps there are reasons that may help us understand why this continues to be backburnered? Should we look into just implementing paypal integration outside of braintree?