简体   繁体   中英

Provide data such as holder name or address to PayPal JavaScript SDK

I am using the PayPal JavaScript SDK as described on https://developer.paypal.com/docs/checkout/

As you can see on this page, there is a "Try the buttons" header and a "MasterCard" logo for example. If you click on "MasterCard" a window pops up, where the user can provide his name, address an so on, see image:

贝宝

I already have all this data from my customer and want to pass it to PayPal, so the form is pre-filled. I know, the user could change the values in the pop-up, but this is OK.

Unfortunately, I did not see any params/methods to provide this information to PayPal. But this must be possible, right?

Please help! :-)

Thank you, schube

Finally, I got (most) of it working (thanks to the pointer of Vikramjit).

The telephone number is still a problem, but I do not need it.

Here is a working example: https://gist.github.com/schube/84811d3a6520bbec5563673730c2440f and here is "playground" for easy experiments: https://developer.paypal.com/demo/checkout/#/pattern/client

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM