2017 © Pedro Peláez
 

library omnipay-netpay

NetPay Payment Gateway Omnipay plugin

image

netpay/omnipay-netpay

NetPay Payment Gateway Omnipay plugin

  • Wednesday, June 29, 2016
  • by netpay
  • Repository
  • 2 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Omnipay : NetPay

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Gateway Setup, (*2)

Basic Gateway Creation Code, (*3)

$gateway = Omnipay::create('NetPay_Api');

On gateway you can set the following options:, (*4)

Allows you to test your code in test environment:, (*5)

$gateway->setTestMode(TRUE);

If your endpoint varies from default you can set it using these functions:, (*6)

$gateway->setLiveEndpoint($liveUrl);
$gateway->setTestEndpoint($testUrl);

You can set your merchant credentials using functions:, (*7)

$gateway->setMerchantId($merchant_id);
$gateway->setUsername($username);
$gateway->setPassword($password);

You can set SSL authentication for connection using functions:, (*8)

$gateway->setCertificatePath($path_to_cert);
$gateway->setCertificateKeyPath($path_to_key);
$gateway->setCertificatePassword($cert_password);

Implemented Gateway Functionalities, (*9)

Transactions using card data can be done following way:, (*10)

$response = $gateway->purchase(array('amount' => '10.00', 'currency' => 'GBP', 'card' => $card))->send();
$response = $gateway->authorize(array('amount' => '10.00', 'currency' => 'GBP', 'card' => $card))->send();

You can use following function on any of previous requests to get order id of the payment:, (*11)

$orderId = $response->getOrderId();
$response = $gateway->capture(array('amount' => '10.00', 'currency' => 'GBP', 'orderId' => $orderId))->send();
$response = $gateway->refund(array('amount' => '10.00', 'currency' => 'GBP', 'orderId' => $orderId))->send();

You can use following function on any of previous requests to get transaction id of the payment:, (*12)

$transactionId = $response->getTransactionId();

$response = $gateway->retrieveTransaction(array('transactionId' => $transactionId, 'orderId' => $orderId))->send();
$response = $gateway->void(array('voidTransactionId' => $transactionId, 'orderId' => $orderId))->send();

Transaction id can also be retrieved from capture, refund and void requests., (*13)

For token transactions following can be used:, (*14)

When saving card, permanent token expires when card expires and temporary one expires one hour after creation, (*15)

$response = $gateway->createCard(array('card' => $card, 'tokenPermanent' => TRUE))->send();

You can retrieve created token from previous request the following way:, (*16)

$token = $response->getToken();

Deletion of saved card, (*17)

$response = $gateway->deleteCard(array('token' => $token))->send();

Retrieve info about stored card, (*18)

$response = $gateway->retrieveCard(array('token' => $token))->send();

Making transactions using saved tokens, (*19)

$response = $gateway->purchase(array('amount' => '10.00', 'currency' => 'GBP', 'token' => $token, 'cvv' => $cvv))->send();
$response = $gateway->authorize(array('amount' => '10.00', 'currency' => 'GBP', 'token' => $token, 'cvv' => $cvv))->send();

Following methods can be used on all requests:, (*20)

Returns TRUE on successful transaction and FALSE on error, (*21)

$response->isSuccessful();

Returns human readable message if there is one or NULL if not, (*22)

$response->getMessage();

Following functions apply to purchase, authorize, capture, refund, void and retrieveTransaction methods, if data is unavailable they return NULL:, (*23)

Value as generated by the acquirer that summarizes the success or otherwise of the proposed operation., (*24)

$response->getCode();

Value generated by the issuing bank in response to a proposal to transfer funds., (*25)

$response->getAuthorizationCode();

The Reference Retrieval Number (RRN) is a unique number generated by the acquirer for a specific merchant transaction. The RRN can be used to retrieve the transaction data from the acquirer., (*26)

$response->getReceipt();

Unique Order ID of the successful transaction., (*27)

$response->getOrderId();

The amount that has been successfully authorized for this order., (*28)

$response->getTotalAuthorizedAmount();

The amount that has been successfully captured for this order., (*29)

$response->getTotalCapturedAmount();

The amount that has been successfully refunded for this order., (*30)

$response->getRefundedAmount();

Summary of the success or otherwise of the proposed operation. List of codes at https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve_transaction_response under response.gateway_code, (*31)

$response->getGatewayCode();

The acquirer CSC response code generated by the card issuing institution, (*32)

$response->getCSCCode();

The card security code result generated to indicate whether the data supplied matches the data held by the cardholder's issuing bank. List of codes at https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve_transaction_response under response.cardsecurity.gateway_code, (*33)

$response->getCSCGatewayCode();

The acquirer AVS response code generated by the card issuing institution., (*34)

$response->getAVSCode();

The address verification result generated to indicate whether the address data supplied matches the data held by the cardholder's issuing bank. List of codes at https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve_transaction_response under response.cardholder_verification.avs_gateway_code, (*35)

$response->getAVSGatewayCode();

The Versions

29/06 2016

dev-master

9999999-dev https://github.com/netpay/omnipay-netpay

NetPay Payment Gateway Omnipay plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant purchase omnipay netpay

29/06 2016

2.0.2

2.0.2.0 https://github.com/netpay/omnipay-netpay

NetPay Payment Gateway Omnipay plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant purchase omnipay netpay

24/06 2016

2.0.1

2.0.1.0 https://github.com/netpay/omnipay-netpay

NetPay Payment Gateway Omnipay plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant purchase omnipay netpay

19/04 2016

2.0

2.0.0.0 https://github.com/netpay/omnipay-netpay

NetPay Payment Gateway Omnipay plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant purchase omnipay netpay