简体   繁体   English

使用Rails在PayPal自适应付款中要求送货地址

[英]Requiring shipping address in PayPal adaptive payments using Rails

I want to set require customers to enter their shipping address when paying using PayPal adaptive payments. 我想设置要求客户在使用PayPal自适应付款进行付款时输入其送货地址。 I've used PayPal's Rails SDK as my starting point. 我以PayPal的Rails SDK为起点。 The setchainedpayment controller is working fine. setchainedpayment控制器工作正常。 From my understanding I need to set senderOptions.requireShippingAddressSelection to true in the setpaymentoptions 从我的理解,我需要设置senderOptions.requireShippingAddressSelection在真setpaymentoptions

My question is, has anyone done this successfully using the PayPal's Rails SDK as a starting point? 我的问题是,有人使用PayPal的Rails SDK成功地做到了这一点吗? The SDK keeps the setchainedpayment and setpaymentoptions in separate controllers. SDK将setchainedpaymentsetpaymentoptions在单独的控制器中。 I'm currently just calling setchainedpayment . 我目前只是打电话给setchainedpayment In order to use setpaymentoptions , would i have to call setpaymentoptions first and then set setpaymentoptions to trigger setchainedpayment ? 为了使用setpaymentoptions ,我是否必须先调用setpaymentoptions然后设置setpaymentoptions来触发setchainedpayment

Seems weird to have to make two consecutive calls just for this. 为此似乎不得不连续打两次电话似乎很奇怪。

As far as I remember, yes. 据我记得,是的。 With Adaptive Payments you have two separate API calls; 使用自适应付款,您可以有两个单独的API调用; one for customizing the checkout, and one for calling the actually chained payment. 一种用于自定义结帐,另一种用于调用实际链接的付款。

Disclaimer: It's been half a year since I last toyed with the Adaptive API's. 免责声明:自从我上次使用Adaptive API以来已经过去了半年。 :-) :-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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