Последняя версия с сервера прошлого разработчика
This commit is contained in:
27
app/Domain/PaymentGateway/Services/QiwiService.php
Executable file
27
app/Domain/PaymentGateway/Services/QiwiService.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\PaymentGateway\Services;
|
||||
|
||||
class QiwiService
|
||||
{
|
||||
public static function payments_link($amount, $order, $user)
|
||||
{
|
||||
$publicKey = env('QIWI_PUBLIC');
|
||||
$SECRET_KEY = env('QIWI_SECRET');
|
||||
|
||||
$billPayments = new \Qiwi\Api\BillPayments($SECRET_KEY);
|
||||
$success_url = env('APP_URL') . '/qiwi-to-payments/status/' . $order->number;
|
||||
|
||||
$params = [
|
||||
'publicKey' => $publicKey,
|
||||
'amount' => $amount,
|
||||
'billId' => $order->number,
|
||||
'successUrl' => $success_url,
|
||||
'email' => $user->email,
|
||||
'comment' => 'Пополнение баланса',
|
||||
];
|
||||
|
||||
return $billPayments->createPaymentForm($params);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user