2017 © Pedro Peláez
 

library zhifubao

支付宝组件

image

jasonccs/zhifubao

支付宝组件

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Omnipay: Alipay

[![travis][ico-travis]][link-travis] [![Latest Version on Packagist][ico-version]][link-packagist] [![Total Downloads][ico-downloads]][link-downloads] [![Code Coverage][ico-code-coverage]][link-code-coverage] ![Software License][ico-license] [![Donate][ico-donate-paypal]][link-donate-paypal] [![Donate][ico-donate]][link-donate], (*1)

Alipay driver for the Omnipay PHP payment processing library, (*2)

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

Cross-border Alipay payment please use lokielse/omnipay-global-alipay, (*4)

Legacy Version please use "lokielse/omnipay-alipay": "dev-legacy", (*5)

Installation

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

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

And run composer to update your dependencies:, (*7)

$ composer update -vvv

Basic Usage

The following gateways are provided by this package:, (*8)

Gateway Description 说明   Links
Alipay_AopPage Alipay Page Gateway 电脑网站支付 - new [Usage][link-wiki-aop-page] [Doc][link-doc-aop-page]
Alipay_AopApp Alipay APP Gateway APP支付 - new [Usage][link-wiki-aop-app] [Doc][link-doc-aop-app]
Alipay_AopF2F Alipay Face To Face Gateway 当面付 - new [Usage][link-wiki-aop-f2f] [Doc][link-doc-aop-f2f]
Alipay_AopWap Alipay WAP Gateway 手机网站支付 - new [Usage][link-wiki-aop-wap] [Doc][link-doc-aop-wap]
Alipay_AopJs Alipay Js Gateway JSAPI - new [Usage][link-wiki-aop-js] [Doc][link-doc-aop-js]
Alipay_LegacyApp Alipay Legacy APP Gateway APP支付 [Usage][link-wiki-legacy-app] [Doc][link-doc-legacy-app]
Alipay_LegacyExpress Alipay Legacy Express Gateway 即时到账 [Usage][link-wiki-legacy-express] [Doc][link-doc-legacy-express]
Alipay_LegacyWap Alipay Legacy WAP Gateway 手机网站支付 [Usage][link-wiki-legacy-wap] [Doc][link-doc-legacy-wap]

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., (*9)

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., (*10)

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., (*11)

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., (*12)

The Versions

16/05 2018

dev-master

9999999-dev

支付宝组件

  Sources   Download

MIT

The Requires

 

The Development Requires