This includes a single implementation for a connection to Authorize.NET AIM Service
This includes a single implementation for a connection to Authorize.NET AIM Service, (*1)
Sign up for a test account to get your test API Login ID and Transaction Key, (*2)
payment_gateway.authorizenet: apiLoginId: xxxxxxxx transactionKey: xxxxxxxx postUrl: https://test.authorize.net/gateway/transact.dll
$gateway = $this->container->get('payment_gateway.authorizenet.config');
$gateway->setAddress($address); $gateway->setAmount($amount); $gateway->setPaymentMethod($creditCard); $gateway->setOrder($order);
$gateway->authorize(); or $gateway->capture();
if ($gateway->hasErrors()) { throw new \Exception($gateway->getErrorMessage()); }
$response = $gateway->getResponse(); $transactionId = $response->getTransactionId(); $code = $response->getResponseCodeText(); $type = $response->getTransactionType());
Sources Download
payment gateway authorize.net ecommerce