fix update from server

This commit is contained in:
mahmood 2025-06-01 20:29:39 +00:00
parent 176a20d1e3
commit 8c7ceea4b0
13 changed files with 4057 additions and 1592 deletions

View File

@ -39,10 +39,11 @@ class SingleCustomerController extends Controller
return new JsonResponse(true);
}
public function verfiy(Request $request){
public function verfiy( Request $request){
$this->validate($request,['token' => 'required','id'=>'required']);
$customer=SingleCustomer::findOrFail($request->id);
if($customer->token_sms!=$request->token)
if($customer->token_sms!=$request->token )
{
return new JsonResponse('کد ارسال شده اشتباه می باشد',422);
}

View File

@ -26,6 +26,8 @@ use Rooyesh\Wallet\interfaces\TransactionInterface;
use Rooyesh\Wallet\interfaces\WalletInterface;
use Rooyesh\Wallet\models\Transaction;
use Rooyesh\Wallet\models\Wallet;
use Illuminate\Support\Facades\Http;
class OrderController extends Controller
{
@ -77,6 +79,16 @@ class OrderController extends Controller
}
$items = $request->order_items;
$customer = Auth::user();
// return $response = Http::post('https://api.zarinplus.com/payment/v2/request/', [
// 'amount' => 50000,
// 'cancel' => 'https://henzagold.shop/cancel/',
// 'success' => 'https://henzagold.shop/success/',
// 'item' => '5000 Toman Voucher',
// 'cellphone' => '09121111111',
// 'email' => 'yourname@domain.com',
// 'token' => '9a1bfc8895cc5df72715fe81f8ac121936d00b61'
// ])->json();
// return [$response,$data];
//ثبت در جدول order
$order = $this->createSingleCustomerOrders($data, auth()->id());
@ -136,13 +148,13 @@ class OrderController extends Controller
}
//ثبت وضعیت های سفارش و ثبت در جدول transaction_order وارسال پیامک به مشتری
$this->afterCreateOrder(auth()->id(),$order,1);
$this->afterCreateOrder(auth()->id(),$order,1);
Sms::Send('09128081392','هنزا(وبسایت)'."\n".'سفارش جدید با شماره '.$order->id.' به مبلغ '.$order->total_price.'تومان ');
Sms::Send('09124406015','هنزا(وبسایت)'."\n".'سفارش جدید با شماره '.$order->id.' به مبلغ '.$order->total_price.'تومان ');
// Sms::Send('09124406015','هنزا(وبسایت)'."\n".'سفارش جدید با شماره '.$order->id.' به مبلغ '.$order->total_price.'تومان ');
// Sms::Send('09126449907','هنزا(وبسایت)'."\n".'سفارش جدید با شماره '.$order->id.' به مبلغ '.$order->total_price.'تومان ');
Sms::Send('09124406015','هنزا(وبسایت)'."\n".'سفارش جدید با شماره '.$order->id.' به مبلغ '.$order->total_price.'تومان ');
Sms::Send('09363366849','هنزا(وبسایت)'."\n".'سفارش جدید با شماره '.$order->id.' به مبلغ '.$order->total_price.'تومان ');
// Sms::Send('09124406015','هنزا(وبسایت)'."\n".'سفارش جدید با شماره '.$order->id.' به مبلغ '.$order->total_price.'تومان ');
// Sms::Send('09363366849','هنزا(وبسایت)'."\n".'سفارش جدید با شماره '.$order->id.' به مبلغ '.$order->total_price.'تومان ');
return response()->json(true);
}

1748
composer-setup.php Normal file

File diff suppressed because it is too large Load Diff

3876
composer.lock generated

File diff suppressed because it is too large Load Diff

0
storage/app/.gitignore vendored Normal file → Executable file
View File

0
storage/app/public/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/cache/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/cache/data/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/sessions/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/testing/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/views/.gitignore vendored Normal file → Executable file
View File

0
storage/logs/.gitignore vendored Normal file → Executable file
View File