25
A
回答
26
是的。
您可以暂停或使用 ManageRecurringPaymentsProfileStatus API通过 取消轮廓。您也可以重新激活 暂停的配置文件。但是,如果已达到 失败付款的最大数量 ,则在重新激活 配置文件之前,您将需要 来增加付款失败 的数量。
请找this参考:
Accodring到PayPal,你可以采取任何的利用ManagerecurringPayments API三个动作。
- 取消 - 仅在活动中的配置文件或 暂停状态可以取消。
- 挂起 - 只有在主动 状态轮廓可以suspended.-
- 重新激活 - 在 暂停状态,可以重新激活.--
3
“订阅通过网站付款标准只能创建配置文件'订阅'按钮在2009年之前,订阅配置文件ID以S-XXXXXXXX开头,您无法通过任何API调用管理这些订阅,2009年之后,订阅配置文件ID以I-XXXXXX开头,您可以取消通过ManageRecurringPaymentsProfileStatus API调用订阅。“
如果遇到同样的问题,只能通过Robert来阅读它,它可以工作,您可以使用API取消标准网站订阅。
0
5
在找到解决方案之前,我发现此线程,并认为我会回来给出答案。 (C#。网络解决方案)
您将需要以下的NuGet包:
Install-Package RestApiSDK
Install-Package PayPalCoreSDK
Install-Package PayPalMerchantSDK
而且以下参考:
using PayPal.Api;
using PayPal.PayPalAPIInterfaceService;
using PayPal.PayPalAPIInterfaceService.Model;
下面的代码:
public static void CancelRecurringPayment(string ProfileID)
{
ManageRecurringPaymentsProfileStatusRequestType request =
new ManageRecurringPaymentsProfileStatusRequestType();
ManageRecurringPaymentsProfileStatusRequestDetailsType details =
new ManageRecurringPaymentsProfileStatusRequestDetailsType();
request.ManageRecurringPaymentsProfileStatusRequestDetails = details;
details.ProfileID = ProfileID;
details.Action = StatusChangeActionType.CANCEL;
// Invoke the API
ManageRecurringPaymentsProfileStatusReq wrapper = new ManageRecurringPaymentsProfileStatusReq();
wrapper.ManageRecurringPaymentsProfileStatusRequest = request;
Dictionary<string, string> configurationMap = new Dictionary<string, string>();
configurationMap.Add("mode", "live");
// Signature Credential
configurationMap.Add("account1.apiUsername", "APIUSERNAME");
configurationMap.Add("account1.apiPassword", "APIPASSWORD");
configurationMap.Add("account1.apiSignature", "APISIGNATURE");
// Create the PayPalAPIInterfaceServiceService service object to make the API call
PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(configurationMap);
ManageRecurringPaymentsProfileStatusResponseType manageProfileStatusResponse =
service.ManageRecurringPaymentsProfileStatus(wrapper);
// Check for API return status
Dictionary<string, string> responseParams = new Dictionary<string, string>();
responseParams.Add("API Status", manageProfileStatusResponse.Ack.ToString());
if (manageProfileStatusResponse.Ack.Equals(AckCodeType.FAILURE) || (manageProfileStatusResponse.Errors != null && manageProfileStatusResponse.Errors.Count > 0))
{
//FAILURE
Console.WriteLine(manageProfileStatusResponse.Errors.ToString());
}
else
{
//SUCCESS
Console.Write("Success!");
}
Console.WriteLine();
}
+1
您的代码非常好,并且重点突出。它帮助我解决了我的问题。谢谢。 – Sunil 2016-05-24 19:45:28
1
- 取消新I- *使用PayPals ManageRecurringPaymentsProfileStatus API进行订阅。
- 使用PhantomJS +这个脚本取消旧S- *订阅:http://blog.degree.no/2015/10/cancelling-old-s-paypal-subscriptions-from-code/
相关问题
- 1. paypal订阅按钮:付款通知
- 2. 如何通过API取消PayPal付款
- 3. 是否可以通过贝宝自适应付款API取消订阅用户?
- 4. 贝宝取消通过PayPal标准订阅按钮创建订阅
- 5. PayPal:您如何通过权限API获取付款通知?
- 6. Paypal订阅/定期付款通过API更改资金来源
- 7. 您如何通过api取消PayPal订阅?
- 8. 通过PHP自动化PayPal付款?
- 9. 通过PayPal实现付款自动化
- 10. 我们可以通过在链接上通过订阅ID取消订阅定期付款
- 11. PayPal通过Opencart订阅按钮发票
- 12. PayPal:通过IPN通过自适应付款API跟踪用户
- 13. 我们可以通过Facebook Graph API中的付款ID获得订阅ID吗?
- 14. 通过PayPal帐户创建定期付款的付款流程
- 15. 无法通过Paypal付款
- 16. PayPal定期付款(订阅按钮)付款响应
- 17. 条纹API PHP。通过subscription_id获取订阅的所有付款
- 18. 通过Paypal或Google Wallet更新订阅付款
- 19. PayPal沙盒IPN订阅付款没有通过?
- 20. Angular 2通过按钮订阅/取消订阅
- 21. 通过PayPal自动支付
- 22. 你如何通过api取消PayPal订阅?
- 23. 跳过付款PayPal定期付款API
- 24. PayPal订阅付款失败
- 25. Paypal订阅/定期付款
- 26. PayPal定期付款/订阅
- 27. 如何使用Paypal客户端rest api创建订阅付款?
- 28. 在paypal中通过按钮付款的实例
- 29. 需要您通过PHP上的PayPal API定期付款的建议
- 30. opencart支付通过PayPal取消
这不只是为 “贝宝的Pro /快速支付”? OP正在讨论常规的PayPal订阅系统。 – erikcw 2011-09-16 15:51:04
为我使用订阅ID作为配置文件ID。 – pat 2012-01-03 04:48:16
您不能使用API取消旧订阅,如下面答案中所述。 – 2012-08-24 11:14:15