ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   PHP (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   Omnipay gateway for Tinkoff Kassa ✌️ (https://forum.antichat.xyz/showthread.php?t=1513962)

Receiver 17.06.2024 20:37

Описание:Платёжный шлюз «Тинькофф Касса» для библиотеки обработки платежей «Omnipay»

Установка:

Bash:





Код:

composer require league/omnipay receiver1/omnipay-tinkoff


Использование:

PHP:





Код:

// Создаём новый платёжный шлюз
$gateway
=
Omnipay
:
:
create
(
'Tinkoff'
)
;
$gateway
-
>
setTerminalId
(
'TerminalId'
)
;
$gateway
-
>
setPassword
(
'TerminalPassword'
)
;
// Создаём новый платёж на сумму 10 руб. 00 коп. с идентификатором заказа 1234
$request
=
$gateway
-
>
purchase
(
[
'amount'
=
>
10
,
'orderId'
=
>
1234
,
'description'
=
>
'optional'
,
'customerKey'
=
>
'optional'
,
'notificationUrl'
=
>
'optional'
,
'successUrl'
=
>
'optional'
,
'failUrl'
=
>
'optional'
,
]
)
;
$log
-
>
write
(
print_r
(
$request
-
>
getData
(
)
,
true
)
)
;
$response
=
$request
-
>
send
(
)
;
if
(
!
$response
-
>
isSuccessful
(
)
)
{
$log
-
>
write
(
$response
-
>
getDetailMessage
(
)
)
;
throw
new
Exception
(
$response
-
>
getMessage
(
)
)
;
}
$log
-
>
write
(
print_r
(
$response
-
>
getData
(
)
,
true
)
)
;
return
$response
-
>
gitRedirectUrl
(
)
;



Исходный код:

GitHub - Receiver1/omnipay-tinkoff

Contribute to Receiver1/omnipay-tinkoff development by creating an account on GitHub.

github.com


Пакет composer: https://packagist.org/packages/receiver1/omnipay-tinkoff

Этот вайб запакованный во мне рвётся изнутри

Я дарю тебе мотивы, принимай их по своей сети


Время: 07:30