简体   繁体   English

Paypal Rest API更新存储的信用卡

[英]paypal rest api update a stored credit card

Using the PayPal Rest API, is there any way to update a stored credit card? 使用PayPal Rest API,有什么方法可以更新存储的信用卡吗? PayPal's documentation on this, " Vault: Store customer credit cards securely .", only specifies: PayPal的文档“ 保险柜:安全存储客户信用卡 。”仅指定:

  • Store a credit card 储存信用卡
  • Delete a stored credit card 删除存储的信用卡
  • Look up a stored credit card 查找存储的信用卡

It does not however, mention anything about updating a stored card. 但是,它没有提及有关更新存储卡的任何内容。

Currently, to update a card, I have the user re-input all their credit card data, I delete the old card from paypal and store the new one, returning a new creditcard_id. 当前,要更新卡,我让用户重新输入所有他们的信用卡数据,我从Paypal中删除了旧卡并存储了新卡,并返回了一个新的creditcard_id。 But if the user only needs to update their card expiration date or their billing address, I don't want them to have to enter their card number again, just security code and new expire date or address. 但是,如果用户只需要更新卡的到期日期或帐单邮寄地址,我就不希望他们再次输入卡号,只需输入安全码和新的到期日期或地址即可。

Any help would be appreciated. 任何帮助,将不胜感激。

The Vault API supports a PATCH method (it is returned by the HATEOAS links from a GET request) but there is no documentation on what kind of request object to send to get it to work properly. Vault API支持PATCH方法(由GET请求的HATEOAS链接返回),但是没有有关发送哪种请求对象以使其正常工作的文档。 I am looking for this also but we might have to contact Paypal Developer Support for the information unless someone can suss out the right request format. 我也在寻找此消息,但是除非有人可以提出正确的请求格式,否则我们可能必须联系Paypal开发人员支持以获取该信息。 (I've been trying but everything barfs back a 401 Malformed Request.) (我一直在尝试,但是所有内容都阻止了401格式错误的请求。)

This is the answer I got from PayPal: 这是我从贝宝获得的答案:


Thank you for contacting Merchant Technical Services. 感谢您与商家技术服务联系。

PATCH request is not available anymore in REST API. REST API中不再提供PATCH请求。 This means that UPDATING a stored credit card is not available anymore. 这意味着无法更新已存储的信用卡。 The option now is to delete the stored credit card and re-add again. 现在的选项是删除存储的信用卡,然后再次重新添加。

I understand, the team is working to revamp the documentation on the site so that it will be updated. 我了解,团队正在努力修改网站上的文档,以便对其进行更新。 I am sorry for the inconvenience caused by this. 不便之处,敬请原谅。

PATCH request is not available anymore in REST API. REST API中不再提供PATCH请求。 This means that UPDATING a stored credit card is not available anymore. 这意味着无法更新已存储的信用卡。 The option now is to delete the stored credit card and re-add again. 现在的选项是删除存储的信用卡,然后再次重新添加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM