Coder Social home page Coder Social logo

paystack's Introduction

Paystack

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require prosperoking/paystack

After installing run vendor publish and select PaystackTransfer from the prompt

$ php artisan vendor:publish

Usage

  • Validate an Account Number: Now you can have a bank account validator bankaccount to enable you to validate an account number you will need to pass the bankcode field to it.
Validator::validate($data,[
    'bankcode'=>'required|string',
    'account_no'=>'required|bankaccount,bankcode'
])
  • Get Banks
    Paystack::getBanks(); // returns  a laravel collection
  • Create a transfer Recipient
    \PaystackTransfer::createTransferReciept($account_no,$bank_code, $account_name);
  • Make a transfer
    \PaystackTransfer::transfer($recipient_code, $amount, $reason);
  • Get transfer
    \PaystackTransfer::fetchTransfer(string $id_or_code);
  • Get Transfer Balance
    \PaystackTransfer::balance()
  • Make Bulk Transfer
    $payload = $transfers->map(fn(Transfer $transfer)=>[
                    'reference'=>$transfer->id,
                    'recipient'=>$transfer->recipient,
                    'amount'=> (int) round($transfer->amount * 100)
                ])->toArray();
    \PaystackTransfer::bulkTransfer($payload);

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

paystack's People

Contributors

prosperoking avatar

Watchers

 avatar  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.