调整config
This commit is contained in:
@@ -11,11 +11,11 @@ return [
|
|||||||
'uri' => [
|
'uri' => [
|
||||||
'unicom' => [
|
'unicom' => [
|
||||||
//下单
|
//下单
|
||||||
'order' => 'https://www.unicompayment.com/wappay3.0/httpservice/wapPayPageAction.do?reqcharset=UTF-8',
|
'order' => 'https://epay.10010.com/wappay3.0/httpservice/wapPayPageAction.do?reqcharset=UTF-8',
|
||||||
//查询
|
//查询
|
||||||
'query' => 'https://www.unicompayment.com/CashierWeb/query/order.htm?reqCharSet=UTF-8',
|
'query' => 'https://epay.10010.com/CashierWeb/query/order.htm?reqCharSet=UTF-8',
|
||||||
//单笔退款
|
//单笔退款
|
||||||
'refund' => 'https://www.unicompayment.com/CashierWeb/trade/singleRefund.htm?reqCharSet=UTF-8',
|
'refund' => 'https://epay.10010.com/CashierWeb/trade/singleRefund.htm?reqCharSet=UTF-8',
|
||||||
],
|
],
|
||||||
'ysd' => [
|
'ysd' => [
|
||||||
'order' => env('APP_URL', 'https://card.ysd-bs.com'),
|
'order' => env('APP_URL', 'https://card.ysd-bs.com'),
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
namespace XuanChen\WoUnicom;
|
namespace XuanChen\WoUnicom;
|
||||||
|
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
|
use App\Models\Welfare;
|
||||||
|
use App\Models\WelfareOrder;
|
||||||
|
use App\Models\WelfarePayment;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use XuanChen\WoUnicom\Action\Init;
|
use XuanChen\WoUnicom\Action\Init;
|
||||||
use XuanChen\WoUnicom\Action\Order;
|
use XuanChen\WoUnicom\Action\Order;
|
||||||
@@ -94,6 +97,20 @@ class WoUnicom
|
|||||||
//验签成功
|
//验签成功
|
||||||
if ($res === true) {
|
if ($res === true) {
|
||||||
|
|
||||||
|
//福利订单
|
||||||
|
if (str_contains($data['orderid'], 'WEAL')) {
|
||||||
|
$order = WelfareOrder::where('orderid', $data['orderid'])->first();
|
||||||
|
if ($order && $order->status == 'UNPAY') {
|
||||||
|
$payment = $order->payment;
|
||||||
|
|
||||||
|
$payment->paid([
|
||||||
|
'type' => 'UNICOM',
|
||||||
|
'payfloodid' => $data['payfloodid'],
|
||||||
|
]);
|
||||||
|
$order->paid();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
$order = \App\Models\Order::where('orderid', $data['orderid'])->first();
|
$order = \App\Models\Order::where('orderid', $data['orderid'])->first();
|
||||||
if ($order && $order->state == 'UNPAY') {
|
if ($order && $order->state == 'UNPAY') {
|
||||||
$payment = \App\Models\Payment::where('orderable_type', get_class($order))
|
$payment = \App\Models\Payment::where('orderable_type', get_class($order))
|
||||||
@@ -109,6 +126,8 @@ class WoUnicom
|
|||||||
$order->paid();
|
$order->paid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return 'SUCCESS';
|
return 'SUCCESS';
|
||||||
} else {
|
} else {
|
||||||
return '验签失败';
|
return '验签失败';
|
||||||
|
|||||||
Reference in New Issue
Block a user