search for active subscription for a customer in Braintree payments

懵懂的女人 提交于 2019-12-11 16:14:03

问题


In my website, I am using Braintree payment gateway for both card payments and PayPal transactions with auto renewal subscriptions.

i am creating the customer and storing the card in Braintree vault for auto renewal.. also using the same customer id for that customer PayPal transactions (if happened)

before proceeding the payment, just need to check for active subscription, for both auto renewable and auto renewal cancelled and still expiration date is due subscription existence.

  • is there any predefined methods for verifying that one with .net code?

I am new to payments, is there any recommended git projects available? so that it would helps a lot

thanks in advance.


回答1:


It sounds like you want to find active subscriptions for a given customer. According to this answer, "customers have a credit_cards array, and each credit card has a subscriptions array."

With that in mind, you can iterate through each credit card to grab each subscription. Once you have all the customer's subscriptions you can check their status. Here are the relevant Braintree Developer Docs links for .NET:

  • customer.CreditCards
  • creditCard.Subscriptions
  • subscription.Status


来源:https://stackoverflow.com/questions/49074527/search-for-active-subscription-for-a-customer-in-braintree-payments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!