贝宝自适应支付API pre-填入用户数据 [英] PayPal Adaptive Payment Api pre-populate user data

查看:195
本文介绍了贝宝自适应支付API pre-填入用户数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个网站,我们将举办活动,并且希望用户用户,以便能够启动一个事件 - 输入自己的支付宝账户信息,并设定一个价格。然后,其他用户可以为他们的注册事件,并直接支付用户,用了我们必须处理自己的信用卡。我们希望那些没有贝宝帐户可以用信用卡支付的用户。

它看起来像PayPal的自适应支付是我们用来实现这一目标最好的API。我有它在沙箱环境中工作。我的问题是这样的 - 用户点击,为用户的注册事件,然后他们进入他们所有的信息,我们需要保持这些信息在我们的数据库中,因此这需要先做(姓名,地址,公司等)。然后,他们会点击一个按钮,上面写着用PayPal支付。这将创建一个paykey和用户,用户有2个选择贝宝登录页面重定向(一登录贝宝或b。再次输入个人信息和信用卡信息)

我想知道我怎么能做到具有贝宝页面已经填写了所有领域,因此用户不必再次输入他们的所有信息。他们将能够删除在文本框中数据,如果帐单地址恰好是不同的。但是,所有我见过的网站不会让用户输入两次这个信息,如果它们是相同的。现在,我知道这是可能的,因为我看到其他网站做到这一点。我已经看着SetPaymentOptions API,但是如何工作的不是很清楚,我需要的用户信息,即使他们不知道贝宝传递了。

我尝试添加值作为贝宝教程建议像这样

 < INPUT TYPE =隐藏NAME =FIRST_NAMEVALUE =约翰>
          < INPUT TYPE =隐藏NAME =姓氏VALUE =李四>
          < INPUT TYPE =隐藏NAME =地址1VALUE =9猛鬼街>

但没有工作,这是从提琴手请求中的原始数据:

  POST https://svcs.sandbox.paypal.com/AdaptivePayments/Pay HTTP / 1.1
   内容类型:文本/ xml的;字符集= UTF-8
   的X PAYPAL - 安全 - 用户名:scotts_XXXXXXXXX_biz_api1.live.com
   的X贝宝安全密码:1344XXXXX
   的X PAYPAL-SECURITY-SIGNATURE:AOLbPDojAEUdeQJ3wXagJXkxYeJDARg4IXXXXXXXXXXXXXXXXXXX
   的X PAYPAL-SERVICE-版本:1.1.0
   的X PAYPAL-APPLICATION-ID:APP-80W2844XXXXXXXXX
   的X PAYPAL-REQUEST数据格式:XML
   的X PAYPAL-RESPONSE数据格式:XML
   主持人:svcs.sandbox.paypal.com
   内容长度:810
   期望:100-继续
   连接:保持活动


解决方案

官方来自PayPal响应:

自适应付款没有在执行此文件的功能。我为这个可能会造成不便表示歉意。

我将离开这个问题,虽然开放的情况下,有人有更好的路线,我去完成我的​​问题已经解释。

编辑:

柜面别人遇到这种情况,是offically 100%不可能的 - 我结束了使用防爆preSS支付API,使用这一点很容易通过用户参数

I am making a website where we are going to host events and would like a user "USER A" to be able to start an event - enter their paypal account info and set a price. Then other users can register for their event and pay USER A directly, with out us having to process their credit card. We would like users that do not have paypal accounts to be able to pay with a credit card.

It looks like Paypal's Adaptive Payment is the best API for us to use to accomplish this. I have it working in the sandbox environment. My problem is this - a user clicks to register for USER A's event , then they enter all their info (name, address, company, ect.) we need to keep this info in our Database so this needs to be done first. Then they will click on a button that says "Pay with Paypal". This creates a paykey and redirects the user to the Paypal login page where the user has 2 options (a. login paypal or b. enter personal info again and credit card information)

I want to know how I can accomplish having all the fields already filled out in the Paypal page , so the user does not have to enter all of their information again. They will be able to delete data in the text boxes if the billing address happens to be different. But all websites I have ever seen to not make the user enter this information twice if they are identical. Now I know this is possible because I have seen other sites do it. I have looked into SetPaymentOptions API , but it is not very clear how that works , and I need user information to be passed even if they are not known to Paypal already.

I tried adding values as suggested in Paypal tutorials like this

          <INPUT TYPE="hidden" NAME="first_name" VALUE="John">
          <INPUT TYPE="hidden" NAME="last_name" VALUE="Doe">
          <INPUT TYPE="hidden" NAME="address1" VALUE="9 Elm Street">

but that didn't work, Here is the raw data from Fiddler from the request :

   POST https://svcs.sandbox.paypal.com/AdaptivePayments/Pay HTTP/1.1
   Content-Type: text/xml;charset=utf-8
   X-PAYPAL-SECURITY-USERID: scotts_XXXXXXXXX_biz_api1.live.com
   X-PAYPAL-SECURITY-PASSWORD: 1344XXXXX
   X-PAYPAL-SECURITY-SIGNATURE: AOLbPDojAEUdeQJ3wXagJXkxYeJDARg4IXXXXXXXXXXXXXXXXXXX
   X-PAYPAL-SERVICE-VERSION: 1.1.0
   X-PAYPAL-APPLICATION-ID: APP-80W2844XXXXXXXXX
   X-PAYPAL-REQUEST-DATA-FORMAT: XML
   X-PAYPAL-RESPONSE-DATA-FORMAT: XML
   Host: svcs.sandbox.paypal.com
   Content-Length: 810
   Expect: 100-continue
   Connection: Keep-Alive

解决方案

Offical Response from PayPal:

" Adaptive Payments does not have any feature in the documents which does this. I apologize for the inconvenience this might cause."

I will leave this question open though in case someone has a better route for me to go to accomplish what I have explained in the question.

EDIT:

Incase someone else comes across this , it is offically 100% not possible - I ended up using Express Payment API , using this it is very easy to pass user parameters.

这篇关于贝宝自适应支付API pre-填入用户数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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