Open arivanbastos opened 2 years ago
PHP Version 7.3.25 Script para reprodução:
$api = new maxiPago; $api->setCredentials(*****, ***********************); $api->setEnvironment("TEST"); $api->setDebug(true); $data = array( "processorID" => "1", // REQUIRED - Use '1' for testing. Contact our team for production values // "referenceNum" => 1, // REQUIRED - Merchant internal order number // "chargeTotal" => 20, // REQUIRED - Transaction amount in US format // "bname" => "João da Silva Santos", // HIGHLY RECOMMENDED - Customer name // "number" => "378282246310005", // REQUIRED - Full credit card number // "expMonth" => 12, // REQUIRED - Credit card expiration month // "expYear" => 2024, // REQUIRED - Credit card expiration year // "cvvNumber" => 123, // HIGHLY RECOMMENDED - Credit card verification code // ); $api->creditCardSale($data); echo $api->getMessage();
Resultado:
-------------------- [2022-11-07 13:11:00:32050] Target URL: https://testapi.maxipago.net/UniversalAPI/postXML -------------------- -------------------- [2022-11-07 13:11:00:34400] XML Request: <?xml version="1.0" encoding="UTF-8"?> <transaction-request><version>3.1.1.15</version><verification><merchantId>****</merchantId><merchantKey>**********</merchantKey></verification><order><sale><processorID>1</processorID><referenceNum>1</referenceNum><billing><name>João da Silva Santos</name></billing><shipping/><transactionDetail><payType><creditCard><number>378282246310005</number><expMonth>12</expMonth><expYear>2024</expYear><cvvNumber>123</cvvNumber></creditCard></payType></transactionDetail><payment><chargeTotal>20</chargeTotal></payment></sale></order></transaction-request> -------------------- -------------------- [2022-11-07 13:11:00:34403] XML Response: <?xml version="1.0" encoding="UTF-8"?><transaction-response><authCode>123456</authCode><orderID>0A0104B1:018452FD0FCC:D06E:01FD6D16</orderID><referenceNum>1</referenceNum><transactionID>13917869</transactionID><transactionTimestamp>1667839627</transactionTimestamp><responseCode>2</responseCode><responseMessage>VOIDED</responseMessage><avsResponseCode>YYY</avsResponseCode><cvvResponseCode>M</cvvResponseCode><processorCode>ERROR</processorCode><processorMessage>Kount IO error.</processorMessage><processorName>SIMULATOR</processorName><creditCardBin>378282</creditCardBin><creditCardLast4>0005</creditCardLast4><errorMessage>Unable to contact kount.</errorMessage><processorTransactionID>828683</processorTransactionID><processorReferenceNumber>1092462</processorReferenceNumber><creditCardCountry>US</creditCardCountry><creditCardScheme>Amex</creditCardScheme></transaction-response> -------------------- -------------------- [2022-11-07 13:11:00:34403] Response time: 1.099 secs. -------------------- Kount IO error.
PHP Version 7.3.25 Script para reprodução:
Resultado: