static void Main(string[] args) { Api api = new Api(); api.Environment = "TEST"; ApiResponse response = api.AddCardOnFile( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "29387292", // 'customerId' - REQUIRED and UNIQUE: Internal merchant customer code // "4111111111111111", // 'creditCardNumber' - REQUIRED: Full credit card number // "10", // 'expirationMonth' - REQUIRED: Credit card expiration month with 2 digits // "2012", // 'expirationYear' - REQUIRED: Credit card expiration year with 4 digits // "John Doe", // 'billingName' - REQUIRED: Customer name // "Rua de Teste, 123", // 'billingAddress1' - REQUIRED: Customer address // "Sala 12", // 'billingAddress2' - Optional: Customer address 2 // "Rio de Janeiro", // 'billingCity' - REQUIRED: Customer city // "RJ", // 'billingState' - REQUIRED: Customer state with 2 characters // "20030000", // 'billingZip' - REQUIRED: Customer zip code // "BR", // 'billingCountry' - REQUIRED: Customer country code per ISO 3166-2 // "551140634666", // 'billingPhone' - REQUIRED: Customer phone number // "*****@*****.**", // 'billingEmail' - REQUIRED: Customer email address // "2015-12-25", // 'onFileEndDate' - Optional: date we no longer accept transactions with this card// null, // 'onFilePermissions' - Optional: permission option for this card. Default is 'null' // "Card belongs to John Doe", // 'onFileComments' - Optional: comments associated with this card // "1000.00" // 'onFileMaxChargeAmount' - Optional: maximum amount this card can be charged // ); if (response.ErrorCode == "0") { // Success } else { // Fail } }
static void Main(string[] args) { Api api = new Api(); api.Environment = "TEST"; ApiResponse response = api.AddConsumer( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "2947293", // 'customerIdExt' - Optional: Internal merchant customer code // "John", // 'firstName' - REQUIRED: Customer first name // "Smith", // 'lastName' - REQUIRED: Customer last name // "Rua de Teste, 123", // 'address1' - Optional: Customer address // "Sala 13", // 'address2' - Optional: Customer address // "Rio de Janeiro", // 'city' - Optional: Customer city // "RJ", // 'state' - Optional: Customer state with 2 characters // "20030000", // 'zipCode' - Optional: Customer zip code // "551140634666", // 'phone' - Optional: Customer phone number // "*****@*****.**", // 'email' - Optional: Customer email address // "12/25/1970", // 'dob' - Optional: Customer date of birth (MM/DD/YYYY) // "2947392739383", // 'ssn' - Optional: Customer official ID number // "M" // 'sex' - Optional: Customer gender (M/F) // ); if (response.ErrorCode == "0") { // Success } else { // Fail } }
static void Main(string[] args) { Api api = new Api(); ApiResponse apiResponse = api.CancelRecurring( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "C0A8C866:0119C7CF0530:3B39:009770A3" // 'OrderID' - REQUIRED: OrderID assigned by maxiPago! when creating the transaction // ); if (apiResponse.ErrorMessage == "0") { // Success } else { // Fail } }
static void Main(string[] args) { Api api = new Api(); api.Environment = "TEST"; ApiResponse response = api.DeleteConsumer( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "2938293" // 'customerId'- REQUIRED: Customer ID create by maxiPago! after the "add-customer" command // ); if (response.ErrorCode == "0") { // Success } else { // Fail } }