我正在使用他们的REST API使用PayPal创建付款.
我已经设置好所有工作但是当我创建WebProfile并调用时setNoShipping(1),没有任何变化:
我的代码:
$inputFields = new InputFields();
$inputFields->setNoShipping(1)
$webProfile = new WebProfile();
$webProfile->setName('test' . uniqid())->setInputFields($inputFields);
Run Code Online (Sandbox Code Playgroud)
根据StackOverflow上的这篇文章,这是不可能的,但是1年之后仍然如此吗?
我有同样的问题,但经过一些研究和许多尝试和错误,我得到它的工作.
您必须"创建"个人资料并将其ID添加到付款.
[...]
$webProfileId = $webProfile->create($apiContext)->getId();
$payment = new Payment();
$payment->setExperienceProfileId($webProfileId);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1195 次 |
| 最近记录: |