Previously I added the ability to store a credit card to a customer on Stripe. This was for use with Stripe’s plan/subscription functions. Stripe will also let you easily charge a credit card that you have put on file. I’ve added that capability to StripeX with the ChargeCard() function.
I also did some minor tweaks to a couple other functions.
|o = NEWOBJECT("StripeX")|
|o.cAPIKey = "YourAPIKey"|
|IF !o.Authenticate() && Make sure Stripe working|
|?"Auth", "Failed", o.cErrorMessage|
|LOCAL lCustomer, lCard|
|lCustomer = "YourCustomerID"|
|lCard = "TheCardIDOnThatCustomer"|
|* Charge a card on file|
|?"Charge", o.ChargeCard(lCustomer, lCard, 1.00, "Stripe Desc", "Statement Desc")|