Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 4
Registered: ‎03-11-2021

How to make EMV transaction with CreditCardTrackType?

I want to make EMV transaction with CreditCardTrackType. Normally it is called like this for Credit Type at PHP.


// Create the payment data for a credit card
$creditCard = new AnetAPI\CreditCardType();
$creditCard->setCardNumber("4111111111111111");
$creditCard->setExpirationDate("2038-12");
$creditCard->setCardCode("123");

// Add the payment data to a paymentType object
$paymentOne = new AnetAPI\PaymentType();
$paymentOne->setCreditCard($creditCard);
 
I tried to change it to this codes

$cardEMV = new AnetAPI\CreditCardTrackType();
$cardEMV->setTrack2("encrypted track2 data");

// Add the payment data to a paymentType object
$paymentOne = new AnetAPI\PaymentType();
$paymentOne->setTrackData($cardEMV);
 
But it is returned "Transaction Failed: Error Code : 85; Error Message : The market type is invalid"
How can I do this EMV transaction?