我想用Paypal API创建一个结算协议,一切正常,直到我想要 使用DoReferenceTransaction进行交易。
然后我得到了结果:
DoReferenceTransactionResponseType Object
(
[DoReferenceTransactionResponseDetails] =>
[FMFDetails] =>
[Timestamp] => 2014-08-18T10:58:51Z
[Ack] => Failure
[CorrelationID] => 9de181ec5132e
[Errors] => Array
(
[0] => ErrorType Object
(
[ShortMessage] => Internal Error
[LongMessage] => Internal Error
[ErrorCode] => 10001
[SeverityCode] => Error
[ErrorParameters] =>
)
[1] => ErrorType Object
(
[ShortMessage] => Invalid Data
[LongMessage] => This transaction cannot be processed.
[ErrorCode] => 10004
[SeverityCode] => Error
[ErrorParameters] =>
)
)
[Version] => 116.0
[Build] => 12303548
)
如果您需要更多信息,请告诉我。
关心丹尼斯
编辑:这是请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:ebay:api:PayPalAPI" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" ><soapenv:Header><ns:RequesterCredentials><ebl:Credentials><ebl:Username>XXX</ebl:Username><ebl:Password>XXX</ebl:Password><ebl:Signature>XXX</ebl:Signature></ebl:Credentials></ns:RequesterCredentials></soapenv:Header><soapenv:Body><ns:DoReferenceTransactionReq><ns:DoReferenceTransactionRequest><ebl:DoReferenceTransactionRequestDetails><ebl:ReferenceID>EC-0W695537H15619824</ebl:ReferenceID><ebl:PaymentAction>Authorization</ebl:PaymentAction><ebl:PaymentType>Any</ebl:PaymentType><ebl:PaymentDetails><ebl:OrderTotal currencyID="USD">1.00</ebl:OrderTotal><ebl:ButtonSource>PayPal_SDK</ebl:ButtonSource><ebl:NotifyURL>http://123plakat.de</ebl:NotifyURL><ebl:ShipToAddress><ebl:Name>John Doe</ebl:Name><ebl:Street1>1 Main St</ebl:Street1><ebl:CityName>San Jose</ebl:CityName><ebl:StateOrProvince>CA</ebl:StateOrProvince><ebl:Country>USA</ebl:Country><ebl:PostalCode>95131</ebl:PostalCode></ebl:ShipToAddress></ebl:PaymentDetails></ebl:DoReferenceTransactionRequestDetails><ebl:Version>116.0</ebl:Version></ns:DoReferenceTransactionRequest></ns:DoReferenceTransactionReq></soapenv:Body></soapenv:Envelope>
答案 0 :(得分:0)
Actually while using the Doreference transaction API , you need to use :
Either billing agreement id (BAID) that you received while creating the billing agreement
with the buyer either using the "CreateBillingAgreement" or "DoExpressCheckoutPayment"
API .
Or the transaction ID that you received from the previous purchase with the buyer .
In the request posted above , instead of passing the BAID or Transaction ID you are
passing the Express checkout Token (<ebl:ReferenceID>EC-0W695537H15619824</ebl:ReferenceID>) while is incorrect .
You need to replace the token with the correct BAID or transaction id .You can refer below url for more info :