处于沙盒模式时未收到PayPal IPN



我正在使用PayPal的Express Checkout,并使用Merchant SDK for Java编写了代码。

这与沙盒模式下PayPal的 IPN 机制有关。

我已经创建了IPN侦听器,并使用IPN模拟器对其进行了彻底的测试。我已确保我指定的通知 URL 收到消息,然后使用 SandBox URL 再次验证以进行 IPN 验证。

但是,当我实际触发适当的付款流程(例如创建计费协议,执行参考事务和取消计费协议)时,我在SandBox模式下没有收到任何IPN。

这是我DoReferenceTransaction时的示例有效负载。我也在下面粘贴了这个的回应。

     <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:ns="urn:ebay:api:PayPalAPI">
    <soapenv:Header>
    <ns:RequesterCredentials>
<ebl:Credentials>
<ebl:Username>****************</ebl:Username>
<ebl:Password>****************</ebl:Password>
<ebl:Signature>****************</ebl:Signature>
</ebl:Credentials>
</ns:RequesterCredentials>
</soapenv:Header>
<soapenv:Body>
<ns:DoReferenceTransactionReq>
<ns:DoReferenceTransactionRequest>
<ebl:Version>119.0</ebl:Version>
<ebl:DoReferenceTransactionRequestDetails>
<ebl:ReferenceID>B-XXXXXXXXXXXXXX</ebl:ReferenceID>
<ebl:PaymentAction>Sale</ebl:PaymentAction>
<ebl:PaymentDetails>
<ebl:OrderTotal currencyID="USD">0.49</ebl:OrderTotal>
<ebl:ItemTotal currencyID="USD">0.49</ebl:ItemTotal>
<ebl:TaxTotal currencyID="USD">0.0</ebl:TaxTotal>
<ebl:OrderDescription>
test Daily plan: test daily subscription plan description
</ebl:OrderDescription>
<ebl:Custom>****************</ebl:Custom>
<ebl:InvoiceID>****************</ebl:InvoiceID>
<ebl:ButtonSource>PayPal_SDK</ebl:ButtonSource>
<ebl:NotifyURL>
https://staging.example.com/apis/payments/notifications/paypal
</ebl:NotifyURL>
<ebl:PaymentDetailsItem>
<ebl:Name>test Daily plan</ebl:Name>
<ebl:Quantity>1</ebl:Quantity>
<ebl:Tax currencyID="USD">0.0</ebl:Tax>
<ebl:Amount currencyID="USD">0.49</ebl:Amount>
<ebl:Description>
test Daily plan: test daily subscription plan description
</ebl:Description>
<ebl:ItemCategory>Digital</ebl:ItemCategory>
</ebl:PaymentDetailsItem>
<ebl:SellerDetails>
<ebl:PayPalAccountID>chintan+cf.pa.s@coolflix.com</ebl:PayPalAccountID>
</ebl:SellerDetails>
<ebl:PaymentAction>Sale</ebl:PaymentAction>
</ebl:PaymentDetails>
</ebl:DoReferenceTransactionRequestDetails>
</ns:DoReferenceTransactionRequest>
</ns:DoReferenceTransactionReq>
</soapenv:Body>
</soapenv:Envelope>

响应

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:ns="urn:ebay:api:PayPalAPI" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xsi:type="wsse:SecurityType"/>
<RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType">
<Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType">
<Username xsi:type="xs:string"/>
<Password xsi:type="xs:string"/>
<Signature xsi:type="xs:string"/>
<Subject xsi:type="xs:string"/>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body id="_0">
<DoReferenceTransactionResponse xmlns="urn:ebay:api:PayPalAPI">
<Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2015-04-30T19:47:48Z</Timestamp>
<Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack>
<CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">bc041a43ee4a7</CorrelationID>
<Version xmlns="urn:ebay:apis:eBLBaseComponents">119.0</Version>
<Build xmlns="urn:ebay:apis:eBLBaseComponents">16474106</Build>
<DoReferenceTransactionResponseDetails xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:DoReferenceTransactionResponseDetailsType">
<BillingAgreementID xsi:type="xs:string">B-9PX106033L488773A</BillingAgreementID>
<PaymentInfo xsi:type="ebl:PaymentInfoType">
<TransactionID>xxxxxxxxxxxxxxxx</TransactionID>
<ParentTransactionID xsi:type="ebl:TransactionId"/>
<ReceiptID/>
<TransactionType xsi:type="ebl:PaymentTransactionCodeType">mercht-pmt</TransactionType>
<PaymentType xsi:type="ebl:PaymentCodeType">instant</PaymentType>
<PaymentDate xsi:type="xs:dateTime">2015-04-30T19:47:47Z</PaymentDate>
<GrossAmount xsi:type="cc:BasicAmountType" currencyID="USD">0.49</GrossAmount>
<FeeAmount xsi:type="cc:BasicAmountType" currencyID="USD">0.07</FeeAmount>
<TaxAmount xsi:type="cc:BasicAmountType" currencyID="USD">0.00</TaxAmount>
<ExchangeRate xsi:type="xs:string"/>
<PaymentStatus xsi:type="ebl:PaymentStatusCodeType">Completed</PaymentStatus>
<PendingReason xsi:type="ebl:PendingStatusCodeType">none</PendingReason>
<ReasonCode xsi:type="ebl:ReversalReasonCodeType">none</ReasonCode>
<ProtectionEligibility xsi:type="xs:string">Ineligible</ProtectionEligibility>
<ProtectionEligibilityType xsi:type="xs:string">None</ProtectionEligibilityType>
</PaymentInfo>
</DoReferenceTransactionResponseDetails>
</DoReferenceTransactionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

在我为特定沙盒业务帐户启用 IPN 后,IPN 开始显示。

我希望他们能更新他们的文档,明确说明沙盒中使用的企业帐户也需要启用 IPN。为此,您需要转到 sandbox.paypal.com 并登录。

相关内容

  • 没有找到相关文章

最新更新