software development kit for purwantara.id payment gateway

Overview

purwantara-laravel

CodeFactor

PURWANTARA LARAVEL

What is Purwantara?

Purwantara is a digital payment service provider that helps businesses to accept digital payments with seamless and secure. Some of the payment services provided by Purwantara are Virtual Account, E Wallet, Credit Card and QRIS.

⚙️ How to install

composer require ezhasyafaat/purwantara-laravel

🛠 Setup configuration

php artisan vendor:publish --provider="Ezhasyafaat\PurwantaraPayment\PurwantaraServiceProvider" --tag="config"

And you have to provide bearer token in .env file. You can get bearer token at purwantara.id

PURWANTARA_TOKEN="BEARER_TOKEN_FROM_PURWANTARA"
PURWANTARA_MODE="SANDBOX" #You can fill this with "SANDBOX" for sandbox mode or "PRODUCTION" for production mode

💈 Virtual account

Virtual accounts is a medium for receiving payments that customer pay.
  • EXAMPLE CREATE VIRTUAL ACCOUNT
use Illuminate\Support\Str;
use Ezhasyafaat\PurwantaraPayment\Purwantara;

public function create_va()
{
    $input = [
        'display_name'      => 'John Doe', // Merchant store name
        'channel_name'      => 'BRI', //Payment channel at purwantara.id
        'order_id_merchant' => Str::uuid(), //Unique id from merchant, customize by merchant
        'expected_amount'   => 10000, //Amount of virtual account
        'description'       => 'Testing create virtual account' //Description of virtual account
        'expired_at'        => Carbon::now()->addHours(2), //Set expired tme
    ];
    
    $purwantara = new Purwantara;
    $response = $purwantara->create_virtual_account($input);
}
  • EXAMPLE CANCEL VIRTUAL ACCOUNT
use App\Models\Transaction;
use Ezhasyafaat\PurwantaraPayment\Purwantara;

public function cancel_va()
{
    $transaction    = Transaction::find(20);
    $input = [
        'purwantara_uuid' => $transaction->purwantara_uuid
    ];

    $purwantara = new Purwantara;
    $response = $purwantara->cancel_virtual_account($input);
}
  • EXAMPLE INQUIRY VIRTUAL ACCOUNT
use App\Models\Transaction;
use Ezhasyafaat\PurwantaraPayment\Purwantara;

public function inquiry_va()
{
    $transaction    = Transaction::find(20);
    $input = [
        'purwantara_uuid' => $transaction->purwantara_uuid
    ];

    $purwantara = new Purwantara;
    $response = $purwantara->inquiry_virtual_account($input);
}

🧸 QRIS

Create QRIS serves as a means of payment for client.
  • EXAMPLE CREATE QRIS
use Illuminate\Support\Str;
use Ezhasyafaat\PurwantaraPayment\Purwantara;

public function create_qris()
{
    $input = [
        'amount'                => 10000, //Amount of qris
        'customer_email'        => '[email protected]', //Customer email
        'customer_first_name'   => 'John', //Customer first name
        'customer_last_name'    => 'Doe', //Customer last name
        'customer_phone'        => '0812345678910', //Customer phone number
        'description'           => 'Testing create qris', //Description of qris
        'channel_name'          => 'shopeepay', //Payment channel at purwantara.id
        'order_id_merchant'     => Str::uuid()
    ];

    $purwantara = new Purwantara;
    $response = $purwantara->create_qris($input);
}
  • EXAMPLE INQUIRY QRIS
use App\Models\Transaction;
use Ezhasyafaat\PurwantaraPayment\Purwantara;

public function inquiry_qris()
{
    $transaction    = Transaction::find(20);
    $input = [
        'purwantara_uuid' => $transaction->purwantara_uuid
    ];

    $purwantara = new Purwantara;
    $response = $purwantara->inquiry_qris($input);
}
  • EXAMPLE CREATE PAYMENT LINK
use Illuminate\Support\Str;
use Ezhasyafaat\PurwantaraPayment\Purwantara;

public function create_paymentlink()
{
    $input = [
        'amount' => 10000,
        'title' => 'SMARTPHONE STORE',
        'description' => 'Buy Smartphone',
        'expired_at' => Carbon::now()->addHour(),
        'external_id' => Str::uuid(),
        'return_url' => 'https://myapp.test/payment'

    ];

    $purwantara = new Purwantara;
    $response = $purwantara->create_payment_link($input);
}
You might also like...
ShurjoPay payment gateway integration for PHP applications.

ShurjoPay PHP Library Using this library you can integrate ShurjoPay payment gateway into your PHP applications. If you face any problem then create i

uPay(bangladesh) payment gateway integration package for laravel

uPay BD Payment Gateway Requirements PHP =7.2 Laravel = 6 Installation composer require codeboxr/upay vendor publish (config) php artisan vendor:pub

MOKA > Opencart 2.3 Payment Gateway
MOKA Opencart 2.3 Payment Gateway

Moka - Opencart Payment Gateway Requirements PHP 5.6.0 and later. Dependencies The bindings require the following extensions in order to work properly

A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products.
A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products.

A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products. Comes with a SDK and command-line tool. Works anywhere that PHP runs.

The game is implemented as an example of scalable and high load architecture combined with modern software development practices
The game is implemented as an example of scalable and high load architecture combined with modern software development practices

Crossword game The game is implemented as an example of scalable and high load architecture combined with modern software development practices Exampl

一个支持在 Swoole 或其它非 Workerman 环境,开发 Gateway Worker 的组件。

Workerman Gateway SDK 一个支持在 Swoole 或其它非 Workerman 环境,开发 Gateway Worker 的组件。 支持用 Workerman Gateway 做网关,Swoole 编写业务代码。 安装 composer require yurunsoft/wor

Xenon\LaravelBDSms is a sms gateway package for sending text message to Bangladeshi mobile numbers using several gateways like sslcommerz, greenweb, dianahost,metronet in Laravel framework

Xenon\LaravelBDSms is a sms gateway package for sending text message to Bangladeshi mobile numbers using several gateways for Laravel. You should use

PHP OOP interface for writing Slack Block Kit messages and modals
PHP OOP interface for writing Slack Block Kit messages and modals

Slack Block Kit for PHP 👉 For formatting messages and modals for Slack using their Block Kit syntax via an OOP interface 👈 By Jeremy Lindblom (@jere

A library for reading and writing DNA test kit files in PHP.

php-dna Requirements php-dna 1.0+ requires PHP 8.0 (or later). Installation There are two ways of installing php-dna. Composer To install php-dna in y

Releases(1.0.6)
The Laravel eCommerce ABA Payment Gateway module allows the admin to integrate the ABA payment gateway to the online store.

Introduction Bagisto ABA Payment Gateway. Requirements: Bagisto: v1.3.2. Installation with composer: Run the following command composer require bagist

Bagisto 3 May 31, 2022
The whmcs payment module for TigoPesa Payment Gateway.

whmcs-tigopesa INSTALLATION INSTRUCTIONS TIGOPESA WHMCS Please follow the instructions below to setup the whmcs-tigopesa gateway module. Download zipp

Medson Naftali 3 Dec 11, 2021
With the help of the Laravel eCommerce CashU Payment Gateway, the admin can integrate the CashU payment method in the Bagisto store.

Introduction Bagisto CashU Payment add-on allow customers to pay for others using CashU payment gateway. Requirements: Bagisto: v1.3.2 Installation wi

Bagisto 2 Aug 22, 2022
A framework agnostic, multi-gateway payment processing library for PHP 5.6+

Omnipay An easy to use, consistent payment processing library for PHP Omnipay is a payment processing library for PHP. It has been designed based on i

The League of Extraordinary Packages 5.7k Dec 7, 2022
WHMCS Payment Gateway Module for Coinify

vrcoinify WHMCS Payment Gateway Module for Coinify Installing guide You should copy all contents from module folder to your WHMCS application folder u

VR DEV TEAM 3 Mar 15, 2022
A site to sell an E-book with paystack payment gateway integrated

YoungAndGetRich This is a platform to sell the named book using paystack payment gateway. Technology used are: MySql database PHP HTML5 CSS3 Bootstrap

Abiodun Sam 1 Oct 26, 2021
A payment gateway plugin for WooCommerce to see if your checkout works.

=== Order Test For All for WooCommerce === Contributors: ikamal Donate link: https://kamal.pw/ Tags: wc order test, wc order, woocommerce, woocommerce

Kamal 3 Dec 7, 2021
Simple laravel package for 2C2P Payment Gateway.

Laravel 2C2P Payment Gateway Simple laravel package for 2C2P Payment Gateway. Installation You can install the package via composer: composer require

null 3 Dec 7, 2021
Integrate Paytm Payment gateway to php website.

paytm-integration-kit-project-for-PHP Integrate Paytm Payment gateway to php website. Copy PaytmKit folder in document root of your server (like /var/

Er. Dipankar Mohanta 1 Feb 11, 2022
Provides Bitcoin-Lightning payment gateway powered by Strike

Bitcoin Payments - Powered by Strike Drupal module to allow user to pay with bitcoin on your Commerce website using Strike API. Strike Js is used for

Rahul Bile 2 Apr 17, 2022