Giter VIP home page Giter VIP logo

omnipay-alipay's Introduction

Omnipay: Alipay

travis Latest Version on Packagist Total Downloads Code Coverage Software License Donate Donate

Alipay driver for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Alipay support for Omnipay.

Cross-border Alipay payment please use lokielse/omnipay-global-alipay

Legacy Version please use "lokielse/omnipay-alipay": "dev-legacy"

Installation

Omnipay is installed via Composer. To install, simply add it to your composer.json file:

"lokielse/omnipay-alipay": "^2.0",

And run composer to update your dependencies:

$ composer update -vvv

Basic Usage

The following gateways are provided by this package:

Gateway Description 说明   Links
Alipay_AopPage Alipay Page Gateway 电脑网站支付 - new Usage Doc
Alipay_AopApp Alipay APP Gateway APP支付 - new Usage Doc
Alipay_AopF2F Alipay Face To Face Gateway 当面付 - new Usage Doc
Alipay_AopWap Alipay WAP Gateway 手机网站支付 - new Usage Doc
Alipay_LegacyApp Alipay Legacy APP Gateway APP支付 Usage Doc
Alipay_LegacyExpress Alipay Legacy Express Gateway 即时到账 Usage Doc
Alipay_LegacyWap Alipay Legacy WAP Gateway 手机网站支付 Usage Doc

Usage

Purchase (购买)

/**
 * @var AopAppGateway $gateway
 */
$gateway = Omnipay::create('Alipay_AopPage');
$gateway->setSignType('RSA2'); // RSA/RSA2/MD5
$gateway->setAppId('the_app_id');
$gateway->setPrivateKey('the_app_private_key');
$gateway->setAlipayPublicKey('the_alipay_public_key');
$gateway->setReturnUrl('https://www.example.com/return');
$gateway->setNotifyUrl('https://www.example.com/notify');

/**
 * @var AopTradePagePayResponse $response
 */
$response = $gateway->purchase()->setBizContent([
    'subject'      => 'test',
    'out_trade_no' => date('YmdHis') . mt_rand(1000, 9999),
    'total_amount' => '0.01',
    'product_code' => 'FAST_INSTANT_TRADE_PAY',
])->send();

$url = $response->getRedirectUrl();

For general usage instructions, please see the main Omnipay repository.

Related

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

omnipay-alipay's People

Contributors

amacneil avatar lokielse avatar aderuwe avatar pilot avatar tomaskit avatar skyred avatar shinvdu avatar andywuzh avatar asaph avatar steveneaston avatar rlerdorf avatar michael2h4ng avatar johnkary avatar focus0802 avatar winzou avatar davesouthey avatar billwang22 avatar willzwl avatar nedmas avatar ruudk avatar pborreli avatar michaeldoe avatar amsross avatar mtudor avatar maclof avatar justinjones avatar dchesterton avatar cfreear avatar kinosang avatar brunogaspar avatar

Watchers

James Cloos 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.