question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic PP amount?

See original GitHub issue
braintree.dropin.create({
            authorization: 'sandbox_XXX ',
            selector: '#braintree-dropin',
            paypal: {
                flow: 'checkout',
                amount : this.getMoney(), // <== THIS
                currency: 'EUR'
            }
        }

Is it possible to have the amount property dynamic? At the moment the amount value is bound on construct time, and since we cannot do byref assignment in JS, this is a problem.

I’m looking for a way to do something like braintree.paypal.amount = XYZ

At the moment, I am emptying the #braintree-dropin and re-creating it, but that’s obviously shit then all CCs data are lost. So, for example, if someone changed his mind about how much they wanna spend/pay, and I reconstruct the dropin and the CC data are lost.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
crookedneighborcommented, May 23, 2017

You can now use updateConfiguration to dynamically update your PayPal settings: https://braintree.github.io/braintree-web-drop-in/docs/current/Dropin.html#updateConfiguration

dropinInstance.updateConfiguration('paypal', 'amount', '10.00');

This was just released with version 1.1.0

0reactions
NinoSkopaccommented, May 23, 2017

So, it is better than what I’m doing. Thanks, putting this on my todo list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamics (music) - Wikipedia
In music, the dynamics of a piece is the variation in loudness between notes or phrases. ... Symphonie fantastique showing examples of pianissimo...
Read more >
Dynamics and Dynamic Changes | Music Appreciation 1
Dynamic Markings · pp, which stands for pianissimo and means “very soft” · ff, which stands for fortissimo and means “very loud” ...
Read more >
Dynamics
Strictly speaking, dynamics refer to the variations in LOUDNESS of a musical composition ... Compare: DYNAMIC RANGE, VOLUME. ... pp. pianissimo (very soft) ......
Read more >
Guide to Dynamics in Music: How to Notate Changes in Volume
Dynamics are changes in the volume of a musical passage. Just as each note has a unique timbre on each instrument, it also...
Read more >
Dynamic strain rate and relative density effect on compression ...
The yield stress of PP copolymer foams decreased with the relative densities, and was always smaller than that of the solid PP copolymer....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found