使用 Rails 要求 PayPal 自适应付款中的送货地址
我想设置要求客户在使用 PayPal 自适应付款方式付款时输入送货地址。我使用 PayPal 的 Rails SDK 作为起点。 setchained payment
控制器工作正常。根据我的理解,我需要在 set paymentoptions
中将 senderOptions.requireShippingAddressSelection
设置为 true
我的问题是,有没有人使用 PayPal 的 Rails SDK 作为起点成功完成此操作? SDK 将 setchained payment 和
set paymentoptions 保留在单独的控制器中。我目前只是调用
setchained payment
。为了使用 set paymentoptions
,我是否必须先调用 set paymentoptions
,然后设置 set paymentoptions
来触发 setchained payment
?
为此必须连续拨打两次电话似乎很奇怪。
I want to set require customers to enter their shipping address when paying using PayPal adaptive payments. I've used PayPal's Rails SDK as my starting point. The setchainedpayment
controller is working fine. From my understanding I need to set senderOptions.requireShippingAddressSelection
to true in the setpaymentoptions
My question is, has anyone done this successfully using the PayPal's Rails SDK as a starting point? The SDK keeps the setchainedpayment
and setpaymentoptions
in separate controllers. I'm currently just calling setchainedpayment
. In order to use setpaymentoptions
, would i have to call setpaymentoptions
first and then set setpaymentoptions
to trigger setchainedpayment
?
Seems weird to have to make two consecutive calls just for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,是的。使用自适应支付,您有两个单独的 API 调用;一种用于自定义结账,一种用于调用实际的链式支付。
免责声明:距离我上次尝试 Adaptive API 已经过去半年了。 :-)
As far as I remember, yes. With Adaptive Payments you have two separate API calls; 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. :-)