maxio-com / chargify_direct_example

Small Sinatra app that demonstrates Chargify Direct using the Chargify2 gem
MIT License
12 stars 12 forks source link

Add card update example #11

Closed dharmamike closed 6 years ago

dharmamike commented 6 years ago

This PR adds an example of how to make use of Chargify Direct to update a card on a subscription. Given the ID of a subscription, navigating to http://localhost:9292/card_update/<SUBSCRIPTION_ID> where <SUBSCRIPTION_ID> is the numeric subscription ID, the user is presented with a form to input the updated card information. It does NOT display the existing card information. If an error occurs after submitting, the form will be redisplayed along with error messaging. Otherwise, a success message is displayed along with the URI for retrieving the call data from the API V2.