Giter Site home page Giter Site logo

payum-allpay's Introduction

Allpay

StyleCI Build Status Total Downloads Latest Stable Version Latest Unstable Version License Monthly Downloads Daily Downloads Scrutinizer Code Quality Code Coverage

The Payum extension to rapidly build new extensions.

  1. Create new project
$ composer create-project payum-tw/allpay
  1. Replace all occurrences of payum with your vendor name. It may be your github name, for now let's say you choose: allpay.
  2. Replace all occurrences of allpay with a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose: allpay.
  3. Register a gateway factory to the payum's builder and create a gateway:
<?php

use Payum\Core\PayumBuilder;
use Payum\Core\GatewayFactoryInterface;

$defaultConfig = [];

$payum = (new PayumBuilder)
    ->addGatewayFactory('allpay', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
        return new \PayumTW\Allpay\AllpayGatewayFactory($config, $coreGatewayFactory);
    })

    ->addGateway('allpay', [
        'factory'     => 'allpay',
        'MerchantID'  => '2000132',
        'HashKey'     => '5294y06JbISpM5x9',
        'HashIV'      => 'v77hoKGq4kWxNNIS',
        'sandbox'     => true,
    ])

    ->getPayum();
  1. While using the gateway implement all method where you get Not implemented exception:
<?php

use Payum\Core\Request\Capture;

$allpay = $payum->getGateway('allpay');

$model = new \ArrayObject([
  // ...
]);

$allpay->execute(new Capture($model));

Resources

License

Skeleton is released under the MIT License.

payum-allpay's People

Contributors

devinkwu avatar recca0120 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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