2c2p payment gateway Redirect PHP-SDK

Overview

2c2p

2c2p-PHP Library 2c2p

Usage

Step 1. Setup 2c2p Credentials

use CCPP\Config;
use CCPP\Locale;

$config               = Config::init();
$config->merchantId   = 'JT02';
$config->secretKey    = '72B8F060B3B923E580411200068A764610F61034AE729AB9EF20CAFF93AFA1B9';
$config->currencyCode = 'MMK';
$config->locale       = Locale::MYANMAR;
$config->baseUrl      = BaseUrl::SANDBOX;

Step 2. Prepare redirect API request payload

use CCPP\Requests\RedirectApiRequest;

$invoiceNo = uniqid(); // Your invoice Number

$request                    = new RedirectApiRequest();
$request->amount            = 10000;
$request->frontendReturnUrl = 'https://example.com/';
$request->description       = 'Invoice Description';
$request->invoiceNo         = $invoiceNo;
$request->paymentChannel    = [PaymentChannel::CREDIT_CARD];
$request->customerName      = 'Zin Kyaw Kyaw';
$request->customerEmail     = '[email protected]';

Step 3. Get redirect Url

use CCPP\RedirectApi;

$payment = new RedirectApi();
$url     = $payment->getUrl($request);

Step 4. Store payment token and invoiceNo in your database

$paymentToken = $payload->paymentToken();

Step 5. On frontendReturnUrl inquiry payment using paymentToken and invoiceNo

$result = $payment->inquiryPayment(); // return PaymentInquiryResponse
$success = $payment->inquiryStatus(); // return boolean (true or false)

Other additional helpful functions

  • $payment->response() get full api response
You might also like...
Minter Blockchain PHP SDK

About This is a pure PHP SDK for working with Minter blockchain Installation Minter Api Methods: getBalance getNonce send getAddresses getStatus getVa

The official PHP SDK for Webmarketer (app.webmarketer.io)
The official PHP SDK for Webmarketer (app.webmarketer.io)

PHP SDK for Webmarketer The official PHP SDK for Webmarketer (app.webmarketer.io). Install To add this package, your project must meet several require

A PHP SDK for the GlobalSmartOTP API.
A PHP SDK for the GlobalSmartOTP API.

GlobalSmartOTP PHP SDK A PHP SDK for the GlobalSmartOTP API. Requirements PHP 7.4 or higher cURL Installation $ git clone [email protected]:GlobalSmartOT

Fatture in Cloud SDK (Software Development Kit) for PHP

FattureInCloud PHP SDK Request informations In every request description you will be able to find some additional informations about context, permissi

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Telegram Bot API - PHP SDK Telegram Bot PHP SDK lets you develop Telegram Bots in PHP easily! Supports Laravel out of the box. Telegram Bot API is an

Explicador e2Payments PHP SDK
Explicador e2Payments PHP SDK

This package seeks to help php developers implement the e2Payments APIs without much hustle. It is based on the REST API whose documentation

Official PHP SDK for interacting with the Knock API.

Knock PHP library Documentation See the documentation for PHP usage examples

Laravel wrapper for the Facebook Graph PHP 8 SDK

Laravel Facebook Graph SDK Installation Getting started with Laravel Facebook Graph is easy - first, install the package via composer composer require

OneSignal PHP SDK

OneSignal SDK for PHP developers with fluent API and supports Laravel / Lumen out of the box.

Releases(v1.0.2)
  • v1.0.2(Aug 19, 2022)

    Features

    • Added support type for config class
    • Created PaymentChannel Class Full Changelog: https://github.com/Bilions-Integration/2c2p-php/compare/v1.0.1...v1.0.2
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Aug 10, 2022)

  • v1.0.0(Aug 10, 2022)

Gateway-pay-bot - Telegram robot for donating or paying + authentication

gateway-pay-bot این ربات جهت دونیت شدن یا پرداخت های شخصی نوشته شده است دارای قابلیت احراز هویت است درگاه های متصل به ربات : زرین پال نکست پی ایدی پی

null 3 Jan 5, 2022
WeChatPay driver for the Omnipay PHP payment processing library

Omnipay: WechatPay WechatPay driver for the Omnipay PHP payment processing library Omnipay is a framework agnostic, multi-gateway payment processing l

Loki Else 312 Jan 4, 2023
PayPal driver for the Omnipay PHP payment processing library

Omnipay: PayPal PayPal driver for the Omnipay PHP payment processing library Omnipay is a framework agnostic, multi-gateway payment processing library

The League of Extraordinary Packages 276 Dec 9, 2022
It's a PHP Application to simplify working with Google Sheets SDK for php.

About GoogleSheetsPHP It's a PHP Application to simplify working with Google Sheets SDK for php. Note: i used Slim 3 to construct the application but

Sami Alateya 5 Dec 20, 2022
API client for ThePay - payment gate API

This is the official highly compatible public package of The Pay SDK which interacts with The Pay's REST API. To get started see examples below.

ThePay.cz s.r.o. 3 Oct 27, 2022
Implementation of a library to process SISP vinti4 payment in a easy way.

Implementation of a library to process SISP vinti4 payment in a easy way.

Faxi 6 Nov 3, 2022
Simple papara payment api that you can use without the need for an activation key

PaparaQrApi Papara QR Api Simple papara payment api that you can use without the need for an activation key. Explore the docs » View Demo About The Pr

Azad 6 Dec 20, 2022
Official repository of the AWS SDK for PHP (@awsforphp)

AWS SDK for PHP - Version 3 The AWS SDK for PHP makes it easy for developers to access Amazon Web Services in their PHP code, and build robust applica

Amazon Web Services 5.7k Jan 1, 2023
Mailgun's Official SDK for PHP

Mailgun PHP client This is the Mailgun PHP SDK. This SDK contains methods for easily interacting with the Mailgun API. Below are examples to get you s

Mailgun Team 1k Dec 23, 2022
A Laravel package to help integrate Shopware PHP SDK much more easier

Shopware 6 Laravel SDK A Laravel package to help integrate Shopware PHP SDK much more easier Installation Install with Composer composer require sas/s

Shape & Shift 16 Nov 3, 2022