ajbdev / payment-gateway-bundle
This includes a single implementation for a connection to Authorize.NET AIM Service
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 7
pkg:composer/ajbdev/payment-gateway-bundle
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-09-27 18:40:47 UTC
README
This includes a single implementation for a connection to Authorize.NET AIM Service
Authorize.net
Sign up for a test account to get your test API Login ID and Transaction Key
config.yml
payment_gateway.authorizenet:
apiLoginId: xxxxxxxx
transactionKey: xxxxxxxx
postUrl: https://test.authorize.net/gateway/transact.dll
Instantiate
$gateway = $this->container->get('payment_gateway.authorizenet.config');
Set Requirements
$gateway->setAddress($address);
$gateway->setAmount($amount);
$gateway->setPaymentMethod($creditCard);
$gateway->setOrder($order);
Authorize or Capture
$gateway->authorize();
or
$gateway->capture();
Error Checking
if ($gateway->hasErrors())
{
throw new \Exception($gateway->getErrorMessage());
}
Get Response Data
$response = $gateway->getResponse();
$transactionId = $response->getTransactionId();
$code = $response->getResponseCodeText();
$type = $response->getTransactionType());