diff --git a/Test/alipay-pos.php b/Test/alipay-pos.php index bd96b94..509e72f 100644 --- a/Test/alipay-pos.php +++ b/Test/alipay-pos.php @@ -21,12 +21,12 @@ $config = include "./alipay.php"; try { // 实例支付对象 $pay = new \AliPay\Pos($config); + // 参数链接:https://docs.open.alipay.com/api_1/alipay.trade.pay $result = $pay->apply([ 'out_trade_no' => '4312412343', // 订单号 'total_amount' => '13', // 订单金额,单位:元 'subject' => '订单商品标题', // 订单商品标题 'auth_code' => '123456', // 授权码 - 'notify_url' => 'http://localhost/notify.php', // 定义通知URL ]); echo '
'; var_export($result); diff --git a/Test/alipay-refund.php b/Test/alipay-refund.php index de03f9f..22579ef 100644 --- a/Test/alipay-refund.php +++ b/Test/alipay-refund.php @@ -24,7 +24,9 @@ $out_trade_no = '56737188841424'; $refund_fee = '1.00'; try { + // 实例支付对象 $pay = new \AliPay\App($config); + // 参考链接:https://docs.open.alipay.com/api_1/alipay.trade.refund $result = $pay->refund($out_trade_no, $refund_fee); echo ''; var_export($result); diff --git a/Test/alipay-scan.php b/Test/alipay-scan.php index 65bb3b8..4157b33 100644 --- a/Test/alipay-scan.php +++ b/Test/alipay-scan.php @@ -21,6 +21,7 @@ $config = include "./alipay.php"; try { // 实例支付对象 $pay = new \AliPay\Scan($config); + // 参考链接:https://docs.open.alipay.com/api_1/alipay.trade.precreate $result = $pay->apply([ 'out_trade_no' => '14321412', // 订单号 'total_amount' => '13', // 订单金额,单位:元 diff --git a/Test/alipay-transfer.php b/Test/alipay-transfer.php index 35a0ead..21a3d8b 100644 --- a/Test/alipay-transfer.php +++ b/Test/alipay-transfer.php @@ -19,7 +19,9 @@ include "../include.php"; $config = include "./alipay.php"; try { + // 实例支付对象 $pay = new \AliPay\Scan($config); + // 参考链接:https://docs.open.alipay.com/api_28/alipay.fund.trans.toaccount.transfer $result = $pay->apply([ 'out_biz_no' => '', // 订单号 'payee_type' => 'ALIPAY_LOGONID', // 收款方账户类型(ALIPAY_LOGONID | ALIPAY_USERID) diff --git a/Test/alipay-wap.php b/Test/alipay-wap.php index f2936b2..ba8f616 100644 --- a/Test/alipay-wap.php +++ b/Test/alipay-wap.php @@ -22,8 +22,9 @@ $config['notify_url'] = 'http://pay.thinkadmin.top/test/alipay-notify.php'; $config['return_url'] = 'http://pay.thinkadmin.top/test/alipay-success.php'; try { -// 实例支付对象 + // 实例支付对象 $pay = new \AliPay\Wap($config); + // 参考链接:https://docs.open.alipay.com/api_1/alipay.trade.wap.pay $result = $pay->apply([ 'out_trade_no' => time(), // 商户订单号 'total_amount' => '1', // 支付金额 diff --git a/Test/alipay-web.php b/Test/alipay-web.php index 47312de..dd52fe7 100644 --- a/Test/alipay-web.php +++ b/Test/alipay-web.php @@ -23,7 +23,9 @@ $config['notify_url'] = 'http://pay.thinkadmin.top/test/alipay-notify.php'; $config['return_url'] = 'http://pay.thinkadmin.top/test/alipay-success.php'; try { + // 实例支付对象 $pay = new \AliPay\Web($config); + // 参考链接:https://docs.open.alipay.com/api_1/alipay.trade.page.pay $result = $pay->apply([ 'out_trade_no' => time(), // 商户订单号 'total_amount' => '1', // 支付金额