简体   繁体   English

为什么setLandingPageType(“ billing”)在PAYPAL PHP REST API SDK WebProfile的沙盒中有效,而在实时版本中却无效

[英]Why is setLandingPageType(“billing”) working in Sandbox but not in Live-Version in PAYPAL PHP REST API SDK WebProfile

I have been working on the following workflow using Paypal Payments. 我一直在使用Paypal Payments从事以下工作流程。 My intent is to send the Customer to the Guest-Payment-Website. 我的目的是将客户发送到Guest-Payment-Web站点。 He should not see paypals login-page at first. 首先,他不应该看到paypals登录页面。 This is because many people do not know that they can pay with Creditcard or Bank-Transfer without registering an Account. 这是因为许多人不知道无需注册帐户就可以使用信用卡或银行转账付款。 I had my whole process tested within the sandbox and it worked. 我在沙盒中测试了整个过程,并且一切正常。 Then I changed to the live-version and $flowConfig->setLandingPageType("billing"); 然后我改为live-version和$flowConfig->setLandingPageType("billing"); it is not affecting the landing-page anymore. 它不再影响目标网页。

Workflow: 工作流程:

  • I prepare some new Webprofile() which is setting things on paypals payment-approval-site (logo etc., shopname). 我准备了一些new Webprofile() ,用于在贝宝付款批准站点(徽标等,商店名称)上进行设置。 It is saved once and identified by some string (XX-XXXX-XXXX-XXXX-XXX) 它被保存一次并由一些字符串标识(XX-XXXX-XXXX-XXXX-XXX)
  • I prepare a transaction and send it to paypal. 我准备交易并将其发送给Paypal。
  • Then the Customer is sent to the specific payment-approval-site on paypal.com 然后将客户发送到paypal.com上的特定付款批准站点
  • the customer should put in his authentication there 客户应在此输入身份验证
  • the customer is sent back to my website 客户被发送回我的网站

To preset visual options I predefine some Webprofile. 为了预设视觉选项,我预定义了一些Web配置文件。

$flowConfig = new \PayPal\Api\FlowConfig();
$flowConfig->setLandingPageType("billing");

$presentation= new \PayPal\Api\Presentation();
...
$inputFields= new \PayPal\Api\InputFields();
...

$webProfile = new \PayPal\Api\WebProfile();
$webProfile->setName("GuestPaymentProfileNameasdf")
->setFlowConfig($flowConfig)
->setPresentation($presentation)
->setInputFields($inputFields);


$webProfile->create($APIauth)

This create-command is giving back some string (XX-XXXX-XXXX-XXXX-XXX) which is saved within paypal to identify this set of options i put into the system. 此创建命令将返回一些字符串(XX-XXXX-XXXX-XXXX-XXX),该字符串将保存在paypal中以标识我放入系统中的这组选项。

...
$payment->setExperienceProfileId('XX-XXXX-XXXX-XXXX-XXX'); //profile ID 
...

Does anyone know what I could do wrong here? 有人知道我在这里会做错什么吗? As written, this is totally working within the Sandbox but when I switch to LIVE the customer always is sent to the normal login-page. 如所写,这在Sandbox中完全可以正常工作,但是当我切换到LIVE时,总是将客户发送到正常的登录页面。

Is there some other method to do this? 还有其他方法可以做到这一点吗? Did I miss some hint or depreached sign? 我是否错过了一些提示或不满意的标志?

I have been working on this and the cause of this behaviour seems to be the limitation of my Paypal-Account within Germany. 我一直在努力,造成这种现象的原因似乎是我在德国境内的Paypal帐户的限制。

At first I was able to buy as a guest . 起初我可以as a guest Then this option vanished - probably with the expiring of my sandbox-infused cookie. 然后,该选项消失了-可能是由于装有沙盒的cookie过期了。 So I called the support of Paypal today and asked some specific questions. 因此,我今天致电贝宝(Paypal),并提出了一些具体问题。

I had other expectations about this guest-buy-functionality, because I got used to the unlimited US-Sandbox-Account. 我对这种来宾购买功能还有其他期望,因为我已经习惯了无限的美国沙盒帐户。 My personal mixup might be caused by a possible internal mixup of options / restrictions / limitations when you change from the unlimited sandbox to your restricted live-account. 当您从无限的沙箱更改为受限的真实帐户时,我的个人混淆可能是由于选项/限制/限制的内部混淆所造成的。 The Thing is, that I should not have seen this guest-billing-page within germany - but it worked... once after going live. 事实是,我should not在德国境内看到这个guest-billing-page -但是它上线了...一次。

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

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