Table of Contents


Stripe - Credit Card Charge

You can use Magentrix Integration to process Credit Card payments via Stripe using the below API:

var trans = new ChargeInfo {
    Currency="USD",
    Amount=50,
    Firstname="John",
    Lastname="Smith",
    CardNumber="XXXXXXXXX1111",
    ExpYear=2016,
    ExpMonth=11,
    CardCvc = "123"
};

//processing the payment
// the string passed to Stripe class is the name of the integration record
// holding the Stripe credentials.
IPaymentGateway stripe = new Stripe("Stripe");
TransactionResult result = stripe.Charge(trans);

//check the results:
if (result.Status.ToLower()!="success") {
   //transaction failed.
} else {
   //the Stripe transaction Id
   string transId = result.TransactionId;
}

In order to see all the options and properties of ChangeInfo click here.