wip
This commit is contained in:
37
app/Repos/Payment/OnlinePaymentRepo.php
Normal file
37
app/Repos/Payment/OnlinePaymentRepo.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repos\Payment;
|
||||
|
||||
use App\Models\Payment\ApiKeyHalkbank;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class OnlinePaymentRepo
|
||||
{
|
||||
public function payCardOrder($resource): string
|
||||
{
|
||||
$orderNumber = $this->generateOrderNumber($resource);
|
||||
|
||||
$response = Http::get('https://mpi.gov.tm/payment/rest/register.do', [
|
||||
'orderNumber' => $orderNumber,
|
||||
'amount' => $booking->total_price.'00',
|
||||
'currency' => 934,
|
||||
'language' => 'ru',
|
||||
'userName' => 301161000067,
|
||||
'password' => 'E3vb2SR3dgTPdff',
|
||||
'returnUrl' => route('online-payment-store'),
|
||||
'failUrl' => route('online-payment-store'),
|
||||
'pageView' => 'DESKTOP',
|
||||
'description' => 'Sargyt',
|
||||
]);
|
||||
|
||||
return 'a';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate order number for payment
|
||||
*/
|
||||
public function generateOrderNumber($resource): int
|
||||
{
|
||||
return ApiKeyHalkbank::generateOrderNumber($resource);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user