Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e640647709 |
@@ -17,7 +17,6 @@ class Sign extends Init
|
|||||||
// $signMsg = str_replace('\\', '', $signMsg);
|
// $signMsg = str_replace('\\', '', $signMsg);
|
||||||
$signMsg = str_replace(' ', '+', $signMsg);
|
$signMsg = str_replace(' ', '+', $signMsg);
|
||||||
$this->sign = $signMsg;
|
$this->sign = $signMsg;
|
||||||
info($this->sign);
|
|
||||||
|
|
||||||
return $this->checkSign();
|
return $this->checkSign();
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace XuanChen\WoUnicom;
|
namespace XuanChen\WoUnicom;
|
||||||
|
|
||||||
|
use App\Models\ActivitySchoolOrder;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use App\Models\Welfare;
|
use App\Models\Welfare;
|
||||||
use App\Models\WelfareOrder;
|
use App\Models\WelfareOrder;
|
||||||
@@ -117,6 +118,21 @@ class WoUnicom
|
|||||||
$order->paid();
|
$order->paid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} elseif (Str::is('AS*', $data['orderid'])) {
|
||||||
|
$order = ActivitySchoolOrder::where('orderid', $data['orderid'])->first();
|
||||||
|
if ($order && $order->state == 'UNPAY') {
|
||||||
|
$payment = \App\Models\Payment::where('orderable_type', get_class($order))
|
||||||
|
->where('orderable_id', $order->id)
|
||||||
|
->latest()
|
||||||
|
->first();
|
||||||
|
|
||||||
|
$payment->state = 'SUCCESS';
|
||||||
|
$payment->out_trade_no = $data['payfloodid'];
|
||||||
|
$payment->type = 'UNICOM';
|
||||||
|
$payment->paid_at = Carbon::now();
|
||||||
|
$payment->save();
|
||||||
|
$order->paid();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$order = \App\Models\Order::where('orderid', $data['orderid'])->first();
|
$order = \App\Models\Order::where('orderid', $data['orderid'])->first();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user