beGateway API Integration – PHP

In this post we will show you beGateway API Integration PHP, hear for beGateway API Integration PHP we will give you demo and example for implement.

This document is designed to provide you with details on how to integrate your business to the beGateway processing system. This guide is a step-by-step instruction as well as a detailed reference material on how to simply and quickly get your website up and running with our services.

The following is an implementation of both API’s using the PHP programming language.

Transaction types for beGateway API Integration

Payment

Payment transaction is a combination of authorization and capture processed at a time. This transaction type is generally used when the goods or services can be immediately provided to the customer.

Authorization

The request used to verify cardholder’s funds. It is typically employed when merchants do not fulfill orders immediately.

Tokenization

The request is used to get a bank card token along with 3-D Secure verification details and then to use the token to submit either payment or authorization transaction.

Capture

After an order is shipped, a previous authorized amount can be settled (captured). The card issuing bank credits the funds to the merchant’s bank account and updates the cardholder’s statement. Card regulations require a merchant to ship goods before settling the funds for an order.

Void

The request allows you to void a transaction that has been previously authorized and is still pending settlement. Voiding a transaction cancels the authorization process and prevents the transaction from being submitted to the processor for settlement.

Refund

The refund allows to credit the customer, e.g. in case of returned goods or cancelation. To post a refund request, a valid transaction UID from a former Capture or Payment transaction is required. It is only possible to credit an amount less than or equal to the initial transaction using the same currency as with the original transaction. This feature also allows you to issue multiple partial refunds against an original transaction.

Credit

The request credits (pushes) funds to a recipient’s card account. The transaction is not supported by all acquiring banks and the transaction is not available to all merchants.

Checkup

The request does a risk check of transaction details against configured risk management rules: white and black lists, amount limits, velocity limits and processing restrictions (e.g. to block certain card BINs)

Chargeback

A chargeback is a transaction disputed by the cardholder or issuer. There are many reasons for chargebacks, but the most common are returned goods, terminated services, disputes, errors or fraud. Chargebacks are a costly part of accepting credit cards. However, merchants can minimise the risk of chargebacks at the time of sale by working to achieve maximum customer satisfaction and transaction accuracy.

Hope this code and post will helped you for implement beGateway API Integration PHP. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs onlincode.org

sample of beGateway API Integration

curl https://api.beGateway.ru/plans \
  -X POST -u shop_id:secret_key \
  -H "Content-Type: application/json" \
  -d \
'{
  "test": true,
  "title": "Basic plan",
  "currency": "USD",
  "plan": {
    "amount": 20,
    "interval": 20,
    "interval_unit": "day"
  },
  "trial": {
    "amount": 10,
    "interval": 10,
    "interval_unit": "hour"
  },
  "language": "en",
  "infinite": true,
  "billing_cycles": nil,
  "number_payment_attempts": 3,
}'

PHP sample of beGateway API Integration

$data = '{
    "id": "pln_a185627c854151de",
    "title": "test plan",
    "currency": "USD",
    "language": "en",
    "plan": {
        "amount": 30,
        "interval": 30,
        "interval_unit": "day"
    },
    "trial": {
        "amount": 30,
        "interval": 30,
        "interval_unit": "hour"
    },
    "number_payment_attempts": 3,
    "test": true
}';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.beGateway.ru/plans");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 300);
//ads your shop_id and secret_key key
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'shop_id:secret_key'
    )); 
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_POST, 1);

if (!($data = curl_exec($ch))) 
{
	return ERROR;
}
curl_close($ch);

Hope this code and post will helped you for implement beGateway API Integration. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs onlincode.org