购买软路由-支付

This commit is contained in:
“wanyongkang”
2022-03-22 16:05:07 +08:00
parent 53e75f65c8
commit aab0d282c1
21 changed files with 304 additions and 63 deletions

View File

@@ -1,8 +1,8 @@
<?php
namespace extend\wechatpay;
require_once APP_PATH . "extend/wechatpay/lib/WxPay.Api.php";
require_once APP_PATH . 'extend/wechatpay/example/WxPay.NativePay.php';
require_once APP_PATH . "extends/wechatpay/lib/WxPay.Api.php";
require_once APP_PATH . 'extends/wechatpay/example/WxPay.NativePay.php';
class Wxpay
{
/**
@@ -13,12 +13,12 @@ class Wxpay
public function pay($param) {
$notify = new \NativePay();
$input = new \WxPayUnifiedOrder();
$input->SetBody("VPS充值-".$param['username']);
$input->SetBody("购买软路由-".$param['username']);
$input->SetOut_trade_no($param['order_no']);
$input->SetTotal_fee($param['money']);
$input->SetTime_start(date("YmdHis"));
$input->SetTime_expire(date("YmdHis", time() + 600));
$input->SetNotify_url("http://vps-api.juip.com/common/wxpay/wxpayverify");
$input->SetNotify_url("http://php-api.juip.com/common/wxpay/wxpayverify");
$input->SetTrade_type("NATIVE");
$result = $notify->GetPayUrl($input);