braintree / braintree-web-drop-in

Braintree Drop-in for the web
MIT License
200 stars 124 forks source link

Paypal checkout question #207

Closed victor-von closed 7 years ago

victor-von commented 7 years ago

General information

Issue description

I am in the process of integrating drop-in to my web page following your drop-in example as guideline with two payment types: credit card and paypal checkout. Credit card works great but I am having issue with Paypal checkout.

The problem with Paypal checkout is that when I hit Paypal checkout button it basically redirect me to Paypal checkout web page which just went through the whole payment process while my original form is still waiting the 'submit' button to be hit to move on to next step (calling requestPaymentMethod on drop-in instance, like what your example does).

I think there should be a way for my form to be notified when

  1. Payment method has been changed, and
  2. When Paypal checkout window is closed, either with sucess or with error.

Thanks.

victor-von commented 7 years ago

My bad, a similar issue was asked and solved. I think I know how to solve this.

crookedneighbor commented 7 years ago

Glad you figured it out. I assume you leveraged the events API?

victorvon commented 7 years ago

Yes, exactly.

Now I have another problem: how can I get something like transaction ID from paypal checkout for later reference? I can do that with credit card easily but not so for paypal checkout. Any suggestion?

Maybe I should reopen this issue?

tihomir-kit commented 7 years ago

Just to save someone else a bit of time, here is the link to the events API: https://braintree.github.io/braintree-web-drop-in/docs/current/Dropin.html#on