当我尝试进行预批准时,会显示此消息,而不是向我显示Paypal登录屏幕。通常它更具体,但现在它只是说"订阅所需的参数之一缺少",所以
我想知道缺少什么参数? 这与APP ID有关吗?
它在Sandbox中运行良好但是在上线时我遇到了这个错误。
预先批准自适应预先批准
错误
PayPal\Types\AP\PreapprovalResponse Object
[responseEnvelope] => PayPal\Types\Common\ResponseEnvelope Object
(
[timestamp] => 2016-01-06T11:02:03.894-08:00
[ack] => Failure
[correlationId] => 4d382b98c6be4
[build] => 17820627
)
[preapprovalKey] =>
[error] => Array
(
[0] => PayPal\Types\Common\ErrorData Object
(
[errorId] => 580029
[domain] => PLATFORM
[subdomain] => Application
[severity] => Error
[category] => Application
[message] => One of the required parameters for subscription is missing
[exceptionId] =>
[parameter] => Array
(
[0] => PayPal\Types\Common\ErrorParameter Object
(
[name] =>
[value] => Subscription
)
)
)
)
请求
PayPal\Types\AP\PreapprovalRequest Object
[requestEnvelope] => PayPal\Types\Common\RequestEnvelope Object
(
[detailLevel] =>
[errorLanguage] => en_US
)
[clientDetails] => PayPal\Types\Common\ClientDetailsType Object
(
[ipAddress] =>
[deviceId] =>
[applicationId] => MY_APP_NAME
[model] =>
[geoLocation] =>
[customerType] =>
[partnerName] =>
[customerId] =>
)
[cancelUrl] => http://localhost/auction/create-auction/?post_new_step=1&projectid=181
[currencyCode] => CAD
[dateOfMonth] =>
[dayOfWeek] =>
[endingDate] => 2016-02-05Z
[maxAmountPerPayment] =>
[maxNumberOfPayments] =>
[maxNumberOfPaymentsPerPeriod] => 1
[maxTotalAmountOfAllPayments] => 1.5
[paymentPeriod] => NO_PERIOD_SPECIFIED
[returnUrl] => http://localhost/auction/?page_id=10&finalize=1&post_new_step=4&projectid=181
[memo] =>
[ipnNotificationUrl] =>
[senderEmail] =>
[startingDate] => 2016-01-06Z
[pinType] =>
[feesPayer] =>
[displayMaxTotalAmount] => 1
[requireInstantFundingSource] =>
[sender] =>
答案 0 :(得分:2)
我刚刚遇到了同样的问题。
我通过填写所有“Max *”字段来解决它。
就我而言,我错过了“maxNumberOfPaymentsPerPeriod”字段。
使用以下请求成功为“一次性”付款创建了批准令牌:
df2.a[08:02:00]
答案 1 :(得分:1)
我们也一直在与这个问题作斗争,似乎它在互联网上出现了很多。不幸的是,PayPal文档列出的大多数字段为 Optional ,当它们不是
时。哪些字段实际上是可选的取决于您正在使用的预批准类型(有Subscription / One-times / On-demand),但PayPal API documentation中似乎没有提到这些。 / p>
查看您的请求,我认为您还需要指定的一个字段为maxAmountPerPayment
,在您的情况下与maxTotalAmountOfAllPayments
虽然错误很神秘,但事实上它告知您,对于订阅类型的预批准,您缺少一些必填字段。遗憾的是,这些必填字段未记录在案。如果事实证明maxAmountPerPayment
不起作用,我的建议是开始填充每个字段并进行测试,直到请求通过!祝你好运。