Created
November 25, 2015 08:01
-
-
Save alovak/c9e6a0862fa988a8e48e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gateway = new StripeGateway("test_sec_k_4c3323cae84d75924f366"); | |
| charge = gateway.CreateChargeObject() | |
| { | |
| Amount = 100, | |
| Currency = "USD", | |
| Description = "Test Charge", | |
| Card = "tok_4c3323cae84d75924f366s289943", // or CustomerId = "cus_xxxxx" | |
| Capture = true | |
| }; | |
| // or | |
| charge.Card = new StartCardObject() | |
| { | |
| number = "4242424242424242", | |
| exp_month = "11", | |
| exp_year = "20", | |
| cvc = "123" | |
| }; | |
| // make charge request | |
| StartCharge startCharge = gateway.CreateCharge(charge); | |
| startCharge.Id // => "ch_xxxxx" | |
| startCharge.Captured // => true | |
| // all other attributes according to the API |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment