Download the PHP package apcopay/apcopay_php without Composer

On this page you can find all versions of the php package apcopay/apcopay_php. 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 apcopay_php

ApcoPay PHP library

The ApcoPay PHP library provides the functionality to process financial transactions with the ApcoPay gateway.

Requirements

Installation

The recommended method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

Alternatively, the ApcoPay PHP library can also be used by copying the contents of this repository in the project folder and using PHP require on the files as shown below.

Description

The ApcoPay PHP library

File loading

The ApcoPay PHP library files can be loaded with the following options:

Composer autoloading

For more information about composer autoloading go to https://getcomposer.org/doc/01-basic-usage.md#autoloading

Skip this step if you already have composer autoloading set up

PHP require

Initialization

The ApcoPayGateway configuration requires the following 5 parameters:

Initialise ApcoPayGateway example

Process transaction

TransactionRequest

TransactionRequest mandatory fields
amount currency_code transaction_type order_reference card_number card_cvv card_holder card_expiry_month card_expiry_year user_ip original_transaction_id user_defined_function
Purchase Mandatory Mandatory Mandatory Recommended Mandatory Recommended Mandatory Mandatory Mandatory
Void Purchase Mandatory Recommended Mandatory
Authorisation Mandatory Mandatory Mandatory Recommended Mandatory Recommended Mandatory Mandatory Mandatory
Capture Mandatory Mandatory Mandatory Recommended Mandatory Mandatory
Void Credit Mandatory Recommended Mandatory
Void Capture Mandatory Recommended Mandatory
Void Authorisation Mandatory Recommended Mandatory
Repeat Purchase Mandatory Recommended Mandatory
Partial Refund Mandatory Recommended Mandatory
Original Credit Mandatory Recommended Mandatory
Repeat Authorisation Mandatory Recommended Mandatory

TransactionResponse

Result codes

Accepted transactions can have one of the following results:

Declined transaction results will vary between banks

Process transaction example

Notification request

Note: The notification response should always return HTTP status code 200 with content OK

Notification request example

Redirect request

Redirect request example

Process flow

Normal transaction flow

3DS transaction flow

  1. The Apco Pay web service will verify whether the card submitted is 3Dsecure ENROLLED

    1. If the card is not enrolled for 3ds, the web service will return a normal response described in the previous section

    2. If the card is enrolled the client needs to be redirected to the verification page https://www.apsp.biz/pay/3DSFP2/verify.aspx?id=4a502205024f474a8aa1933ceac42e56 Where Id needs to be replaced with the value that was returned in the first response
  2. The Client must continue the verification and submit his PIN

  3. After a successful verification the client is redirected the redirection_url in the configuration

Reference transaction flow

Transaction types

Name Value Description
Purchase 1 Transfers value from the cardholders account
Void Purchase 3 Cancellation of a purchase transaction – Before end of day
Authorisation 4 Reserve the specified value from the card holder
Capture 5 Transfers a reserved value from the cardholders account
Void Credit 6 Cancel a credit - Before end of day
Void Capture 7 Cancel a capture - Before end of day
Void Authorisation 9 Cancel an authorization - Before end of day
Repeat Purchase 11 Repeats a purchase by submitting the original PSPID
Partial Refund 12 Reverse a partial/full amount of the original transaction
Original Credit 13 Pay out an amount greater than the amount of the original transaction
Repeat Authorisation 14 Repeats an authorization by submitting the original PSPID

Transaction types in detail

Authorisation

Authorisation - Authorisation is the first part of a two-step process

If approved, the requested amount is reserved from the credit limit of the submitted card. The reservation process is therefore used if the capturing is to be completed at a later date.

Important - The authorisation (reservation) period is approx. 7 days for credit cards and 3 days for debit cards (we recommend that you check with the bank being used). Once the reservation period has expired, it is no longer possible to capture this transaction.

Capture

Capturing is the second step of the two-step process mentioned above. A capture transaction must be preceded by an "Authorisation" transaction.

The amount to be captured must be less than or equal to the authorized amount. This also means, that partial amounts can be captured.

During the capture, an amount is debited from the customer account and credited to the merchant account.

Purchase

Purchase is a payment transaction done in a single step.

The purchase transaction handles both an authorisation and a capture at the same time.

If approved, the requested amount is debited from the customer account and credited to the merchant account.

Partial Refund

Refunds are transactions that return the payments to the customer. The refunded amount can be a part of the paid amount or the full paid amount. Refunds can relate to an existing Capture or to a Purchase. In the case of credit card payments, refunds are credited to your customer's credit card account.

Important - Refunds are not allowed for gaming merchants.

Original Credit

The original credit is used to pay out an amount greater than the amount of the original transaction.

Void Purchase, Void Credit, Void Capture and Void Authorisation

If a Void request is executed by 23:59 (bank’s time zone) of the original transaction date - the acquirer would be able to cancel this transaction.

Testing

Card Number Expiry Date CVV
Normal successful transaction 4444 4444 4444 4444 12/yy where yy is the current year 444
Rejected normal transaction 5555 5555 5555 5557 12/yy where yy is the current year 444
Successful 3DS transaction 4444 4444 4444 2228 12/yy where yy is the current year 444

License

The ApcoPay PHP library is open-sourced software licensed under the MIT license.


All versions of apcopay_php with dependencies

PHP Build Version
Package Version
Requires ext-curl Version *
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 apcopay/apcopay_php contains the following files

Loading the files please wait ....