restore composer.json, add mysqli extension
This commit is contained in:
20
app/Http/Controllers/Payments/after_pay.php
Executable file
20
app/Http/Controllers/Payments/after_pay.php
Executable file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Billing;
|
||||
use App\Models\Order;
|
||||
use App\Api\Sms;
|
||||
|
||||
$billing = Billing::find($transaction->transactionable_id);
|
||||
$billing->status = 'payed';
|
||||
$billing->transaction_id = $transaction->system_transaction_id;
|
||||
$billing->save();
|
||||
|
||||
|
||||
$sms = new Sms();
|
||||
|
||||
$order = Order::find($billing->order_id);
|
||||
$order->payment_status = 'payed';
|
||||
$order->save();
|
||||
|
||||
$message = "Quyoshli vash zakaz: {$order->id} uspeshno oplachen!";
|
||||
$sms->send($order->user->phone, $message);
|
||||
Reference in New Issue
Block a user