脚本宝典收集整理的这篇文章主要介绍了php – Paypal REST API:无法将登录页面设置为开票,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
use PayPal\Api\FlowConfig; use PayPal\Api\PResentation; use PayPal\Api\InputFields; use PayPal\Api\WebProfile; $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 (\PayPal\Exception\PayPalConnectionException $ex) { die($ex); } $profileid = $createProfileResponse->getId();
然后是:
$payment = new Payment(); $payment->setIntent('sale') ->setPayer($payer) ->setredirectUrls($redirectUrls) ->setTransactions([$transaction]) ->setExperienceProfileId($profileId);
徽标图像在结果页面上显示正常,因此我知道ID有效.我也尝试按照我在网上找到的建议清除cookie,但这没有效果.提前感谢任何建议.
以上是脚本宝典为你收集整理的php – Paypal REST API:无法将登录页面设置为开票全部内容,希望文章能够帮你解决php – Paypal REST API:无法将登录页面设置为开票所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。