feat: 修改转账
This commit is contained in:
parent
e21ca4d47c
commit
9fc94bcd91
|
@ -67,7 +67,8 @@ class PaymentNew
|
||||||
|
|
||||||
// Guzzle HTTP client
|
// Guzzle HTTP client
|
||||||
$client = new Client();
|
$client = new Client();
|
||||||
|
var_dump(11111111111);
|
||||||
|
var_dump($orderId);
|
||||||
// 请求数据
|
// 请求数据
|
||||||
$payload = [
|
$payload = [
|
||||||
"Amount" => $money,
|
"Amount" => $money,
|
||||||
|
@ -78,14 +79,16 @@ class PaymentNew
|
||||||
"PayeeBankName" => $payeeBankName,
|
"PayeeBankName" => $payeeBankName,
|
||||||
"PayeeIFSCCode" => "",
|
"PayeeIFSCCode" => "",
|
||||||
"PaymentChannelId" => $PaymentChannelId,
|
"PaymentChannelId" => $PaymentChannelId,
|
||||||
"ShopInformUrl" => "http://149.129.107.38/",
|
"ShopInformUrl" => "http://149.129.107.38",
|
||||||
"ShopOrderId" => $orderId,
|
"ShopOrderId" => $orderId."",
|
||||||
"ShopUserLongId" => "776ae472-d4fc-435c-9639-be5763138d95"
|
"ShopUserLongId" => "776ae472-d4fc-435c-9639-be5763138d95"
|
||||||
];
|
];
|
||||||
|
var_dump($payload);
|
||||||
// 生成加密值
|
// 生成加密值
|
||||||
$encrypt_value = self::generate_encrypt_value($payload, $secret_key);
|
$encrypt_value = self::generate_encrypt_value($payload, $secret_key);
|
||||||
|
var_dump($encrypt_value);
|
||||||
$payload["EncryptValue"] = $encrypt_value;
|
$payload["EncryptValue"] = $encrypt_value;
|
||||||
|
var_dump($encrypt_value);
|
||||||
try {
|
try {
|
||||||
// 发送 POST 请求
|
// 发送 POST 请求
|
||||||
$response = $client->post($url, [
|
$response = $client->post($url, [
|
||||||
|
|
|
@ -118,9 +118,9 @@ class WithdrawController
|
||||||
}
|
}
|
||||||
//用户积分减少$money
|
//用户积分减少$money
|
||||||
UserRewardDao::base($user_id, 1, - ($money_no + 300), '提现');
|
UserRewardDao::base($user_id, 1, - ($money_no + 300), '提现');
|
||||||
$userbank = Userbank::where('id', $bank_id)->first();\
|
$userbank = Userbank::where('id', $bank_id)->first();
|
||||||
//存入数据库
|
//存入数据库
|
||||||
Withdraw::create([
|
$withdraw = Withdraw::create([
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
'amount' => $money,
|
'amount' => $money,
|
||||||
'status' => 2,
|
'status' => 2,
|
||||||
|
|
Loading…
Reference in New Issue