Paymill API:如何更新订阅的信用卡? [英] Paymill API: How do I update a subscription's credit card?
问题描述
我可以创建订阅,但我无法弄清楚如何,以便它使用一个新的信用卡更新订阅。
I can create subscriptions, but I can't figure out how to update a subscription so that it uses a new credit card.
这是我已经试过:(假设已经有一个现有的客户端,支付和订阅)
This is what I've tried: (assuming there is already an existing client, payment and subscription)
- 在UI创建令牌
- 在服务器上创建一个对象支付
-
更新客户端是这样的:
- create token in ui
- create a payment object in server
update client like this:
paymill.clients.update(客户端ID,{付款:payment.id},回调);
我得到这个错误:
Error: Identifier,payment
Exception: Api_Exception_InvalidParameter
其中要求做我需要实现这个
Which calls do I need to make to achieve this?
推荐答案
Paymill已经更新了API和你现在可以提出这个要求,可用于更新订阅CC细节。
Paymill has updated the api and you can now make this request which can be used to update cc details on a subscription.
首先创建一个支付,然后更新为新的支付ID认购。
First create a payment and then update the subscription with the new payment id.
curl -X PUT https://api.paymill.com/v2/subscriptions/<SubscriptionId> -u <ApiKey>: -d payment=<PaymentId>
这篇关于Paymill API:如何更新订阅的信用卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!