gpt4 book ai didi

PayPal CreateRecurringPaymentsProfile 无效 token

转载 作者:太空宇宙 更新时间:2023-11-03 16:08:56 32 4
gpt4 key购买 nike

我正在尝试使用 SOAP API 创建定期付款,我执行了 PayPal API 手册中提到的以下步骤:

1- 调用“设置快速结帐”API。2- 获取 token 并将买家重定向到 PayPal 网站。3-用户完成后,他将重定向到我的响应页面。4- 调用“快速结帐”API。5- 调用“CreateRecurringPaymentsProfile”API。

我调用的 SOAP 结构:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ebay:api:PayPalAPI" xmlns:urn1="urn:ebay:apis:eBLBaseComponents">
<soapenv:Header>
<urn:RequesterCredentials>
<urn1:Credentials>
<urn1:Username>'+un+'</urn1:Username>
<urn1:Password>'+pw+'</urn1:Password>
<urn1:Signature>'+sig+'</urn1:Signature>
</urn1:Credentials>
</urn:RequesterCredentials>
</soapenv:Header>
<soapenv:Body>
<urn:CreateRecurringPaymentsProfileReq>
<urn:CreateRecurringPaymentsProfileRequest>
<urn1:Version>'+version+'</urn1:Version>
<urn1:CreateRecurringPaymentsProfileRequestDetails>
<urn1:Token>'+token+'</urn1:Token>
<urn1:RecurringPaymentsProfileDetails>
<urn1:SubscriberName>'+FirstName+' '+LastName+'</urn1:SubscriberName>
<urn1:BillingStartDate>'+strCurrentDate+'</urn1:BillingStartDate>
</urn1:RecurringPaymentsProfileDetails>
<urn1:ScheduleDetails>
<urn1:Description>'+BillingAgreementDescription+'</urn1:Description>
<urn1:PaymentPeriod>
<urn1:BillingPeriod>'+billingPeriod+'</urn1:BillingPeriod>
<urn1:BillingFrequency>'+billingFrequency+'</urn1:BillingFrequency>
<urn1:Amount currencyID="'+UsedCurrency+'">'+amount+'</urn1:Amount>
</urn1:PaymentPeriod>
</urn1:ScheduleDetails>
</urn1:CreateRecurringPaymentsProfileRequestDetails>
</urn:CreateRecurringPaymentsProfileRequest>
</urn:CreateRecurringPaymentsProfileReq>
</soapenv:Body>
</soapenv:Envelope>

最佳答案

通常发生这种情况是因为您没有在 SetExpressCheckout 请求中包含计费协议(protocol)参数。因此,您取回的 token 对于与 CreateRecurringPaymentsProfile 一起使用确实无效。

这是一个 old sample set of calls我放在一起为人们回答这个问题。它使用 NVP 而不是 SOAP,但您可以看到它在 SEC 请求中包含了 BILLINGTYPE 和 BILLINGAGREEMENTDESCRIPTION 参数。确保相应地将这些内容包含在 SEC 请求中。

关于PayPal CreateRecurringPaymentsProfile 无效 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26737309/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com