seasofthpyosithu/gmo-payment

gmo支付库laravel

dev-master 2019-11-28 10:56 UTC

This package is auto-updated.

Last update: 2024-09-28 21:38:30 UTC


README

使用composer安装

$ composer require seasofthpyosithu/gmo-payment

如果您使用的Laravel版本小于5.5,您需要将提供者在config/app.php中添加

'providers' => [
    // ...
     Seasofthpyosithu\GmoPayment\GmoPaymentServiceProvider::class,
],

如果您愿意,可以使用外观。在config/app.php中将引用添加到您的别名数组中。

'RemittanceApi' => Seasofthpyosithu\GmoPayment\Facades\RemittanceApi::class

配置

gmo支付需要连接配置。要开始,您需要发布所有供应商资源

$ php artisan vendor:publish --provider="Seasofthpyosithu\GmoPayment\GmoPaymentServiceProvider"

用法

use Seasofthpyosithu\GmoPayment\Facades\RemittanceApi;

创建银行账户

RemittanceApi::accountRegistration(
    'bank00000', // bank id
    '0001', // bank code
    '813', // branch code
    AccountType::NORMAL, // account type
    'An Yutzy', // account name
    '0012345', // account number
    AccountMethod::CREATE, // method
);

更新银行账户

RemittanceApi::accountRegistration(
    'bank00000', // bank id
    '0001', // bank code
    '813', // branch code
    AccountType::NORMAL, // account type
    'An Yutzy', // account name
    '0012345', // account number
    AccountMethod::UPDATE, // method
);

删除银行账户

RemittanceApi::deleteAccount(
    'bank00000', // bank id
);

搜索银行账户

RemittanceApi::accountSearch(
    'bank00000', // bank id
);

创建存款

RemittanceApi::depositRegistration(
    'dep00000', // deposit id
    DepositMethod::CREATE // method CREATE or CANCEL
    'bank00000', // bank id
    1000 // amount
);

取消存款

RemittanceApi::depositRegistration(
    'dep00000', // deposit id
    DepositMethod::CANCEL // method CREATE or CANCEL
);

搜索存款

RemittanceApi::depositSearch(
    'dep00000', // deposit id
);

创建邮件存款

RemittanceApi::mailDepositRegistration(
    'dep00000', // deposit id
    DepositMethod::CREATE // method CREATE or CANCEL
    'anyutzy@demo.com', // mail address
    'anyutzy@demo.com' // shop mail address
    'An Yutzy', // account name
    '20170503' // Expire
    1000 // amount
);

取消邮件存款

RemittanceApi::mailDepositRegistration(
    'dep00000', // deposit id
    DepositMethod::CANCEL // method CREATE or CANCEL
);

搜索邮件存款

RemittanceApi::mailDepositSearch(
    'dep00000', // deposit id
);

检查余额

RemittanceApi::balanceSearch();