删除(或预填)PayPal Express Checkout 的地址详细信息 [英] Removing (or prefilling) the address details for PayPal Express Checkout

查看:25
本文介绍了删除(或预填)PayPal Express Checkout 的地址详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用 PayPal 作为我构建的自定义购物车的付款选项.我已经设置了购物车,并且完成"了结帐.它向用户询问他们的地址.完成所有字段后,他们点击Pay with PayPal".这不会将它们发送到 PayPal.首先它处理他们输入的数据,然后将它们重定向到 PayPal 进行支付.

I am looking at using PayPal as a payment option for my custom shopping cart I have built. I already have a cart set up, and a checkout 'complete'. It asks the user for their address. Once they have completed all the fields, they hit 'Pay with PayPal'. This does not send them to PayPal yet. First it processes the data they entered, THEN redirects them off to PayPal to pay.

这一切都在使用 PayPal Express Checkout.

This is all using PayPal Express Checkout.

想要的流程是这样的.

  1. 用户将商品添加到购物车.所有这些都发生了,并且已经由我的服务器处理,没有调用 PayPal.我希望用户在我的网站上管理购物车,而不是 PayPal.
  2. 完成后,用户点击结帐".然后这会将它们带到我服务器上的另一个页面(例如 http://mywebsite.com/store/checkout/) 确认购物车并输入送货地址和其他详细信息.
  3. 完成此操作后,他们会点击使用 PayPal 付款"按钮并被发送到我的服务器上的另一个页面(例如,http://mywebsite.com/store/checkout/pay/),我的 Web 应用程序在其中处理订单和信息并将其添加到数据库中.现在,这就是我希望 Paypal 魔法发生的地方.
  4. 在处理上一页(第三步)期间,我希望我的 Web 应用程序使用 SetExpressCheckout API 联系贝宝并将用户重定向到贝宝付款页面.
  5. 用户输入他们的信用卡或 PayPal 详细信息并在 https://paypal.com 上付款.
  6. 然后将用户发送回我的网站,告知他们已收到付款(如果已收到)或他们需要注意的任何其他警报.订单状态会相应更新,订单已发货.
  1. The user adds items to the cart. All this happens and is already handled by my server, with no calls to PayPal. I want the user to manage the cart on MY WEBSITE, not PayPal.
  2. Once finished, the user hits 'checkout'. This then takes them to another page on my server (for example http://mywebsite.com/store/checkout/) where they confirm their shopping cart and enter their shipping address and other details.
  3. Once they finish that, they click a 'Pay with PayPal' button and are sent to another page on MY server (for example, http://mywebsite.com/store/checkout/pay/) where my web application processes the order and information and adds it to the database. Now, HERE is where I want the paypal magic to happen.
  4. During the processing of the previous page (step three), I want my web application to contact paypal using the SetExpressCheckout API and redirect the user to the PayPal payment page.
  5. The user enters their credit card or PayPal details and pays on https://paypal.com.
  6. The user is then sent back to my website to be told that payment has been received (if it has) or any other alerts that they need to be aware of. The order status is updated accordingly and the order is shipped off.

我很确定这一切都是可能的.是吗?我正在使用 Python 和 Django.

I am quite sure this is all possible. Is it? I am using Python and Django.

我唯一的问题是我不希望用户必须两次输入他们的送货/付款地址(一次在我的网站上,一次在贝宝支付网站上).我不希望用户必须在 PayPal 付款网站上输入他们的送货/付款地址.不需要这个,因为我已经有了.是否可以从 PayPal 网站中删除地址字段,或者仅使用我网站中的数据预先填充它们?

My only problem is that I do not want the users to have to enter their shipping/payment address TWICE (once on my website, once on the paypal payment website). I do not want the user to have to enter their shipping/payment address at the PayPal payment website. There is no need for this as I already have it. Is it possible to remove the address fields from the PayPal website, or just pre-fill them with data from my website?

推荐答案

是的,Paypal API 中有一个选项可以覆盖地址输入.请看这里:

Yes, there is an option in the Paypal API to override the address input. See here:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECCustomizing#id0864F070OHS__id0864H804030

为方便起见,此处复制相关信息:

Relevant info copied here for convenience:

To override the shipping address:

Set the ADDROVERRIDE parameter to 1 in the call to SetExpressCheckout.
Set the following shipping address parameters in the call to SetExpressCheckout to the address values you want to use for the new address.

SHIPTONAME
SHIPTOSTREET
SHIPTOCITY
SHIPTOSTATE (Optional)
SHIPTOCOUNTRYCODE
SHIPTOZIP
SHIPTOSTREET2 (Optional)

这篇关于删除(或预填)PayPal Express Checkout 的地址详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆