php – Paypal REST API:无法将登录页面设置为开票
发布时间:2020-12-13 15:57:48 所属栏目:PHP教程 来源:网络整理
导读:我正在使用Paypal REST API和 PHP SDK为慈善机构建立一个捐赠功能.我一直在尝试将着陆页类型设置为“结算”,但似乎没有任何改变.这是我用于定义Web体验配置文件的代码(根据 http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payment-experience/CreateWeb
我正在使用Paypal REST API和
PHP SDK为慈善机构建立一个捐赠功能.我一直在尝试将着陆页类型设置为“结算”,但似乎没有任何改变.这是我用于定义Web体验配置文件的代码(根据
http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payment-experience/CreateWebProfile.html):
use PayPalApiFlowConfig; use PayPalApiPresentation; use PayPalApiInputFields; use PayPalApiWebProfile; $flow = new FlowConfig(); $flow->setLandingPageType('Billing'); $presentation = new Presentation(); $presentation->setLogoImage('xxxxxxxx') ->setBrandName('xxxxxxxx') ->setLocaleCode('GB'); $inputFields = new InputFields(); $inputFields->setNoShipping(1) ->setAddressOverride(0); $webProfile = new WebProfile(); $webProfile->setName('xxxxxxxx' . uniqid()) ->setFlowConfig($flow) ->setPresentation($presentation) ->setInputFields($inputFields); try { $createProfileResponse = $webProfile->create($paypal); } catch (PayPalExceptionPayPalConnectionException $ex) { die($ex); } $profileId = $createProfileResponse->getId(); 然后是: $payment = new Payment(); $payment->setIntent('sale') ->setPayer($payer) ->setRedirectUrls($redirectUrls) ->setTransactions([$transaction]) ->setExperienceProfileId($profileId); 徽标图像在结果页面上显示正常,因此我知道ID有效.我也尝试按照我在网上找到的建议清除cookie,但这没有效果.提前感谢任何建议. 解决方法
在PayPal的新结帐方式中,如下所示,LandingPage设置无法使用.这是PayPal方面的一个已知问题.很抱歉给您带来不便.但是在旧式中,LandingPage可以工作
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |