Coder Social home page Coder Social logo

nobubank-php's Introduction

nobubank-php

release language license size downloads pulls

About

This library give you an easy way to call Nobu Bank API in elegant code style. Example :

NobuBank::qris()
    ->setTransactionNo('ABCDEFGHIJKLMN')
    ->setReferenceNo('1234567890')
    ->setAmount(1000)
    ->setValidTime(3600)
    ->setStoreName('Nama Merchant')
    ->setCityName('Ponorogo')
    ->createDynamic();

Installation

  1. Run command
composer require zerosdev/nobubank-php

The following steps only needed if you are using Laravel

  1. Then
php artisan vendor:publish --provider="ZerosDev\NobuBank\Laravel\ServiceProvider"
  1. Edit config/nobu_bank.php and put your API credentials

Usage

Laravel

<?php

namespace App\Http\Controllers;

use NobuBank;

class YourController extends Controller
{
    public function index()
    {
        $dynamicQris = NobuBank::qris()
            ->setTransactionNo('ABCDEFGHIJKLMN')
            ->setReferenceNo('1234567890')
            ->setAmount(1000)
            ->setValidTime(3600)
            ->setStoreName('Nama Merchant')
            ->setCityName('Ponorogo')
            ->createDynamic();
            
        dd($dynamicQris);
    }
}

Non-Laravel

<?php

require 'path/to/your/vendor/autoload.php';

use ZerosDev\NobuBank\Client as NobuClient;

$mode = 'development';
$config = [
    'login'         => '',
    'password'      => '',
    'merchant_id'   => '',
    'store_id'      => '',
    'secret_key'    => '',
];

$nobu = new NobuClient($mode, $config);

$dynamicQris = $nobu->qris()
    ->setTransactionNo('ABCDEFGHIJKLMN')
    ->setReferenceNo('1234567890')
    ->setAmount(1000)
    ->setValidTime(3600)
    ->setStoreName('Nama Merchant')
    ->setCityName('Ponorogo')
    ->createDynamic();
    
print_r($dynamicQris);

nobubank-php's People

Contributors

zerosdev avatar bayu29 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.