Ai
1 Star 0 Fork 0

comm-package/calculation-core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ecpaydemo.php 974 Bytes
一键复制 编辑 原始数据 按行查看 历史
LiangMG 提交于 2022-12-12 14:36 +08:00 . EC台湾支付
<?php
/**
* Created by PhpStorm.
* User: lmg
* Date: 2022/12/12 14:15
*/
require_once __DIR__ . '/vendor/autoload.php';
use Calculation\Payment\ecpay\Pay;
$config = [
// HashKey
'HashKey' => 'X2s6E3hGy7r4MbpT',
// HashIV
'HashIV' => 'ixAibhRYN1q1KGen',
// MerchantID
'MerchantID' => '3176563',
// 异步通知地址
'NotifyUrl' => 'http://newcaixi.com/api/v1/ecnotify',
// 同步通知地址
'ReturnUrl' => 'http://newcaixi.com/api/v1/ec_return',
];
$order = [
'body' => '测试购买商品',
'goods_name' => '人教版小学数学二年级',
'order_id' => rand(100000000000, 9999999999999),
'goods_total_price' => 1,
'payMethod' => 'credit', //付款方式::当为ecpay的时候 信用卡(credit) ATM(atm) 超市条码(barcode)
];
$ECPay = new Pay();
$ECPay->setOptions($config);
// EC支付
// $res = $ECPay->pay($order);
/*$res = $ECPay->query('167055105517023');
var_dump($res);die;*/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/comm-package/calculation-core.git
git@gitee.com:comm-package/calculation-core.git
comm-package
calculation-core
calculation-core
master

搜索帮助