Download the PHP package yohns/authorize.net-payments without Composer

On this page you can find all versions of the php package yohns/authorize.net-payments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package authorize.net-payments

Yohns\Payments

A PHP 8.2+ wrapper around the Authorize.Net PHP SDK with first-class line item support. Designed to make it easy to submit orders with product/menu catalog data attached to each transaction.


Requirements


Installation

Or clone and install dependencies manually:


Directory Structure


Credentials

Sandbox credentials are obtained from developer.authorize.net. Production credentials are obtained from account.authorize.net.

Both are found under Account → Security Settings → API Credentials & Keys.

The Transaction Key is always exactly 16 characters. Generating a new one immediately invalidates the previous one.


Quick Start


Classes

PaymentGateway

The main entry point. Instantiate once and reuse across requests.

charge()

Authorize and capture in a single step. The total amount is automatically calculated from line item totals plus tax and shipping, minus any discount.

authorizeOnly()

Places a hold on the card without capturing funds. Use captureAuthorized() later to complete the charge.

captureAuthorized()

Captures a previously authorized transaction.

void()

Voids an unsettled transaction.

refund()

Refunds a settled transaction. Supports partial refunds.


LineItem

Represents a single product or menu item on an order. Authorize.Net supports up to 30 line items per transaction.


CreditCard

Authorize.Net sandbox test card numbers: 4111111111111111 (Visa), 5424000000000015 (Mastercard), 370000000000002 (Amex). Any future expiration date and any CVV work in sandbox.


BillingAddress

Providing address and zip enables AVS (Address Verification System) checks, which reduce fraud risk and can lower interchange fees.


PaymentResult

Immutable result object returned by every gateway method.

AVS result codes: Y = full match, A = address only, Z = zip only, N = no match, U = unavailable.

CVV result codes: M = match, N = no match, P = not processed, S = should be present, U = issuer unable to process.


Error Reference

Code Meaning
E00007 Authentication failed — wrong API Login ID or Transaction Key, or sandbox/production mismatch
E00003 Invalid element — often a malformed request field
E00027 Transaction was unsuccessful
NO_RESPONSE No response from gateway — network or TLS issue

Sandbox vs Production

Sandbox and production credentials are not interchangeable. Using sandbox credentials against production (or vice versa) will return E00007.


License

MIT


All versions of authorize.net-payments with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
authorizenet/authorizenet Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yohns/authorize.net-payments contains the following files

Loading the files please wait ...