static void Main(string[] args) { Transaction transaction = new Transaction(); transaction.Environment = "TEST"; ResponseBase response = transaction.Void( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "293823", // 'transactionID' - REQUIRED: Transaction ID created by maxiPago! // "127.0.0.1" // 'ipAddress' - Optional // ); if (response.IsTransactionResponse) { TransactionResponse result = response as TransactionResponse; if (result.ResponseCode == "0") { // Success } else { // Declined } } else if (response.IsErrorResponse) { ErrorResponse result = response as ErrorResponse; // Fail } }
static void Main(string[] args) { Transaction transaction = new Transaction(); transaction.Environment = "TEST"; ResponseBase response = transaction.Return( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "7F000001:013829A1C09E:8DE9:016891F0", // 'orderID' - REQUIRED: Order ID replied by maxiPago! after authorization // "ORD22921972", // 'referenceNum' - REQUIRED: Merchant internal order number // "132.22" // 'chargeTotal' - REQUIRED: Transaction amount in US format // ); if (response.IsTransactionResponse) { TransactionResponse result = response as TransactionResponse; if (result.ResponseCode == "0") { // Success } else { // Declined } } else if (response.IsErrorResponse) { ErrorResponse result = response as ErrorResponse; // Fail } }
static void Main(string[] args) { Transaction transaction = new Transaction(); transaction.Environment = "TEST"; ResponseBase response = transaction.Auth( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "ORD937393483", // 'referenceNum' - REQUIRED: Merchant internal order number // 133.45, // 'chargeTotal' - REQUIRED: Transaction amount in US format // "4111111111111111", // 'creditCardNumber' - REQUIRED: Full credit card number // "03", // 'expMonth' - REQUIRED: Credit card expiration month with 2 digits // "2015", // 'expYear' - REQUIRED: Credit card expiration year with 4 digits // null, // 'cvvInd' - Optional: Indicator of absense of CVV code // "123", // 'cvvNumber' - RECOMMENDED: Credit card verification number // null, // 'authentication' - Optional: Valid only for Cielo. Please see full documentation for more info // "1", // 'processorId' - REQUIRED: Acquirer code for transaction routing Use '1' for testing. // null, // 'numberOfInstallments' - Optional: Number of installments for credit card purchases ("parcelas") // // Send 'null' if no installments are used // "N", // 'chargeInterest' - Optional: Charge interest flag (Y/N) for installment purchase ("com" e "sem" juros) // "1270.0.1", // 'ipAddress' - Optional // null // 'customerIdExt' - Optional: Merchant internal customer number // "John Smith", // 'billingName' - RECOMMENDED: Customer name // "Rua de Teste, 123", // 'billingAddress' - Optional: Customer address // null, // 'billingAddress2' - Optional: Customer address // "Rio de Janeiro", // 'billingCity' - Optional: Customer city // "RJ", // 'billingState' - Optional: Customer state with 2 characters // "20030000", // 'billingPostalCode' - Optional: Customer zip code // "BR", // 'billingCountry' - Optional: Customer country per ISO 3166-2 // null, // 'billingPhone' - Optional: Customer phone number // "*****@*****.**", // 'billingEmail' - Optional: Customer email addres // "Jane Smith", // 'shippingName' - Optional: Shipping name // null, // 'shippingAddress' - Optional: Shipping address // null, // 'shippingAddress2' - Optional: Shipping address // null, // 'shippingCity' - Optional: Shipping city // null, // 'shippingState' - Optional: Shipping state with 2 characters // null, // 'shippingPostalCode' - Optional: Shipping zip code // null, // 'shippingCountry' - Optional: Shipping country per ISO 3166-2 // null, // 'shippingPhone' - Optional: Shipping phone number // null, // 'shippingEmail' - Optional: Shipping email address // null, // 'currencyCode' - Optional: Currency code. Valid only for ChasePaymentech. Please see full documentation for more info // null, // 'softDescriptor' - Optional null // 'iataFee' - Optional ); if (response.IsTransactionResponse) { TransactionResponse result = response as TransactionResponse; if (result.ResponseCode == "0") { // Success } else { // Decline } } else if (response.IsErrorResponse) { ErrorResponse result = response as ErrorResponse; // Fail } }
static void Main(string[] args) { Transaction transaction = new Transaction(); transaction.Environment = "TEST"; ResponseBase response = transaction.Auth( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "ORD4828381B", // 'referenceNum' - REQUIRED: Merchant internal order number // 432.31, // 'chargeTotal' - REQUIRED: Transaction amount in US format // "1", // 'processorId' - REQUIRED: Acquirer code for routing transactions. Use '1' for testing. // "eBUv/SIBJv0=", // 'token' - REQUIRED: Credit card token assigned by maxiPago! // "999", // 'customerId' - REQUIRED: Customer ID created by maxiPago! // "2", // 'numberOfInstallments' - Optional: Number of installments for credit card purchases ("parcelas") // // Send 'null' if no installments are used // "N", // 'chargeInterest' - Optional: Charge interest flag (Y/N) for installment purchase ("com" e "sem" juros) // "127.0.01", // 'ipAddress' - Optional // null, // 'customerIdExt' - Optional: Merchant internal customer number // "John Smith", // 'billingName' - RECOMMENDED: Customer name // "Rua de Teste, 123", // 'billingAddress' - Optional: Customer address // null, // 'billingAddress2' - Optional: Customer address // "Rio de Janeiro", // 'billingCity' - Optional: Customer city // "RJ", // 'billingState' - Optional: Customer state with 2 characters // "20030000", // 'billingPostalCode' - Optional: Customer zip code // "BR", // 'billingCountry' - Optional: Customer country per ISO 3166-2 // "551140634666", // 'billingPhone' - Optional: Customer phone number // "*****@*****.**", // 'billingEmail' - Optional: Customer email addres // "Jane Doe", // 'shippingName' - Optional: Shipping name // null, // 'shippingAddress' - Optional: Shipping address // null, // 'shippingAddress2' - Optional: Shipping address // null, // 'shippingCity' - Optional: Shipping city // null, // 'shippingState' - Optional: Shipping state with 2 characters // null, // 'shippingPostalCode' - Optional: Shipping zip code // null, // 'shippingCountry' - Optional: Shipping country per ISO 3166-2 // null, // 'shippingPhone' - Optional: Shipping phone number // null, // 'shippingEmail' - Optional: Shipping email address // "BRL", // 'currencyCode' - Optional: Currency code. Valid only for ChasePaymentech. Please see full documentation for more info // null, // 'softDescriptor' - Optional null // 'iataFee' - Optional ); if (response.IsTransactionResponse) { TransactionResponse result = response as TransactionResponse; if (result.ResponseCode == "0") { // Success } else { // Declined } } else if (response.IsErrorResponse) { ErrorResponse result = response as ErrorResponse; // Fail } }
static void Main(string[] args) { Transaction transaction = new Transaction(); transaction.Environment = "TEST"; ResponseBase response = transaction.Recurring( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "ORD22382820", // 'referenceNum' - REQUIRED: Merchant internal order number // 150.00, // 'chargeTotal' - REQUIRED: Transaction amount in US format // "5555555555554444", // 'creditCardNumber' - REQUIRED: Full credit card number // "10", // 'expMonth' - REQUIRED: Credit card expiration month with 2 digits // "2020", // 'expYear' - REQUIRED: Credit card expiration year with 4 digits // null, // 'cvvInd' - Optional: Indicator of absense of CVV code // "123", // 'cvvNumber' - RECOMMENDED: Credit card verification number // "1", // 'processorId' - REQUIRED: Acquirer code to route transaction. Use '1' for testing. // "2", // 'numberOfInstallments' - Optional: Number of installments for credit card purchases ("parcelas") // "N", // 'chargeInterest' - Optional: Charge interest flag (Y/N) for installment purchase ("com" e "sem" juros) // "127.0.0.1", // 'ipAddress' - Optional // null // 'customerIdExt' - Optional, Merchant internal customer number // "new", // 'action' - REQUIRED for this command - Always 'new' // "2013-12-25", // 'startDate' - REQUIRED: Date of the 1st purchase (YYYY-MM-DD format) // "1", // 'frequency' - REQUIRED: Billing frequency ("1", "3", "6", ...) // "monthly", // 'period' - REQUIRED: Period of billing ("daily", "weekly" or "monthly") // "12", // 'installments' - REQUIRED: Number of payments to be executed // "2" // 'failureThreshold' - REQUIRED: Number of retries if transaction fails // ); if (response.IsTransactionResponse) { TransactionResponse result = response as TransactionResponse; if (result.ResponseCode == "0") { // Success } else { // Declined } } else if (response.IsErrorResponse) { ErrorResponse result = response as ErrorResponse; // Fail } }
static void Main(string[] args) { Transaction transaction = new Transaction(); transaction.Environment = "TEST"; ResponseBase response = transaction.Boleto( "100", // 'merchantId' - REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // 'merchantKey' - REQUIRED: Merchant Key assigned by maxiPago! // "ORD238937282", // 'referenceNum' - REQUIRED: Merchant internal order number // "10.00", // 'chargeTotal' - REQUIRED: Transaction amount in US format // "12", // 'processorId' - REQUIRED: Bank chosen to process transaction. Use '12' for Boleto testing. // "127.0.0.1", // 'ipAddress' - Optional // "CUST12739", // 'customerIdExt' - Optional: Merchant code for customer // "2013-12-25", // 'expirationDate' - REQUIRED: Boleto expiration date (YYYY-MM-DD format) // "01020304", // 'number' - REQUIRED and UNIQUE - Boleto ID number with maximum of 8 numbers // "Sr. Caixa, não aceitar pagamento em cheques;Boleto referente ao pedido 238937282", // Optional: Instructions printed in the boleto slip. Use ";" to break lines // "John Smith", // 'billingName' - REQUIRED: Customer name // "Rua de Teste, 123", // 'billingAddress' - Optional: Customer address // "Sala 13", // 'billingAddress2' - Optional: Customer address // "Rio de Janeiro", // 'billingCity' - Optional: Customer city // "RJ", // 'billingState' - Optional: Customer state with 2 characters // "20030000", // 'billingPostalCode' - Optional: Customer zip code // "BR", // 'billingCountry' - Optional: Customer country code per ISO 3166-2 // "551140634666", // 'billingPhone' - Optional: Customer phone number // "*****@*****.**" // 'billingEmail' - Optional: Customer email address // ); if (response.IsTransactionResponse) { TransactionResponse result = response as TransactionResponse; if (result.ResponseCode == "0") { // Success } else { // Decline } } else if (response.IsErrorResponse) { ErrorResponse result = response as ErrorResponse; // Fail } }
static void Main(string[] args) { Transaction transaction = new Transaction(); transaction.Environment = "TEST"; ResponseBase response = transaction.OnlineDebit( "100", // REQUIRED: Merchant ID assigned by maxiPago! // "merchant-key", // REQUIRED: Merchant Key assigned by maxiPago! // "ORD238937282", // REQUIRED: Merchant internal order number // 1.00, // REQUIRED: Transaction amount in US format // "17", // REQUIRED: Bank chosen to process transaction. Use '17' for testing // "key=value", // Optional: Passed back in GET when customer is redirected // "127.0.0.1", // Optional // "12345678909", // REQUIRED FOR ITAU: Merchant code for customer // "Fulano de Tal", // REQUIRED FOR ITAU: Customer name // "Av. República do Chile, 230", // REQUIRED FOR ITAU: Customer address // "Centro", // REQUIRED FOR ITAU: Customer address 2 (Bairro) // "Rio de Janeiro", // REQUIRED FOR ITAU: Customer city // "RJ", // REQUIRED FOR ITAU: Customer state with 2 letters // "20031170", // REQUIRED FOR ITAU: Customer zip code, numbers only // "BR", // REQUIRED FOR ITAU: Customer country, 2 letters per ISO-3166-2 // "552122924746", // Optional: Customer phone number, numbers only // "*****@*****.**" // Optional: Customer email address // ); if (response.IsTransactionResponse) { TransactionResponse result = response as TransactionResponse; if (result.ResponseCode == "0") { // Redirect to url below string url = result.OnlineDebitUrl; } else { // Decline } } else if (response.IsErrorResponse) { ErrorResponse result = response as ErrorResponse; // Fail } }