错误:
xxxxxx@gmail.com的总发票金额与延迟链式付款的付款金额不符。
我没有得到setPaymentOptions
的正确回复,因为我在payrequst
和发票数据都通过了同等数额,但无法比较它们的价格。这是因为货币代码在这里我们传递payRequest
收货人的货币代码和发票数据吗?我们没有传递货币代码的任何参数。有人可以帮帮我吗?
PayPal\Types\AP\SetPaymentOptionsResponse Object
(
[responseEnvelope] => PayPal\Types\Common\ResponseEnvelope Object
(
[timestamp] => 2016-08-25T00:11:21.138-07:00
[ack] => Failure
[correlationId] => 8cc5bbe5cde59
[build] => 24003818
)
[error] => Array
(
[0] => PayPal\Types\Common\ErrorData Object
(
[errorId] => 580023
[domain] => PLATFORM
[subdomain] => Application
[severity] => Error
[category] => Application
[message] => The total invoiced amount for xxxxxx@gmail.com does not match the amount in the pay request
[exceptionId] =>
[parameter] => Array
(
[0] => PayPal\Types\Common\ErrorParameter Object
(
[name] =>
[value] => invoiceData
)
[1] => PayPal\Types\Common\ErrorParameter Object
(
[name] =>
[value] => xxxxxx@gmail.com
)
)
)
)
)
我传递给PayRequest
和InvoiceDatas
的参数:
PayPal\Types\AP\PayRequest Object
(
[requestEnvelope] => PayPal\Types\Common\RequestEnvelope Object
(
[detailLevel] =>
[errorLanguage] => en_US
)
[clientDetails] =>
[actionType] => PAY_PRIMARY
[cancelUrl] => http://localhost.xyz.com/paymentError?cancel=true
[currencyCode] => USD
[feesPayer] =>
[ipnNotificationUrl] => http://replaceIpnUrl.com
[memo] =>
[pin] =>
[preapprovalKey] =>
[receiverList] => PayPal\Types\AP\ReceiverList Object
(
[receiver] => Array
(
[0] => PayPal\Types\AP\Receiver Object
(
[amount] => 2.00
[email] => ABC-facilitator@gmail.com
[phone] =>
[primary] => false
[invoiceId] =>
[paymentType] =>
[paymentSubType] =>
[accountId] =>
)
[1] => PayPal\Types\AP\Receiver Object
(
[amount] => 8.00
[email] => xxxxxxx@gmail.com
[phone] =>
[primary] => true
[invoiceId] =>
[paymentType] =>
[paymentSubType] =>
[accountId] =>
)
)
)
[reverseAllParallelPaymentsOnError] =>
[senderEmail] =>
[returnUrl] => http://localhost.xyz.com/expressCallback
[trackingId] =>
[fundingConstraint] =>
[sender] =>
[payKeyDuration] =>
)
PayPal\Types\AP\ReceiverOptions Object
(
[description] =>
[customId] =>
[invoiceData] => PayPal\Types\AP\InvoiceData Object
(
[item] => Array
(
[0] => PayPal\Types\AP\InvoiceItem Object
(
[name] => Brand
[identifier] => 1
[price] => 8.00
[itemPrice] => 8.00
[itemCount] => 32
)
)
[totalTax] => 2
[totalShipping] => 27
)
[receiver] => PayPal\Types\AP\ReceiverIdentifier Object
(
[email] => xxxxxx@gmail.com
[phone] =>
[accountId] =>
)
[referrerCode] =>
)
答案 0 :(得分:0)
这里要纠正2件与价格/金额有关的事情以消除错误。
1:在 InvoiceItem 对象
中[name] => Brand
[identifier] => 1
[price] => 256 //THIS IS EQUAL TO itemPrice * itemCount
[itemPrice] => 8.00
[itemCount] => 32
enter code here
2:在收件人对象
中 作为主要接收者的xxxxxxx@gmail.com应始终具有等于总订单金额(项目+税收+折扣+运费)的金额,无论次要接收者是否可用。所以应该纠正:[amount] => 285.00 //256 + 2 + 27
[email] => xxxxxxx@gmail.com
[phone] =>
[primary] => true
[invoiceId] =>
[paymentType] =>
[paymentSubType] =>
[accountId] =>
这个二级接收器的Receiver对象指出,在总共285.00中,2.00将被记入次要接收者:
[amount] => 2.00 //2.00 will be credited to ABC out of 285.00
[email] => ABC-facilitator@gmail.com
[phone] =>
[primary] => false
[invoiceId] =>
[paymentType] =>
[paymentSubType] =>
[accountId] =>
更正这些内容,如果您仍然面临金额不匹配的问题,请告诉我。