Настоящий документ описывает программные интерфейсы платёжного шлюза Сбербанка, который позволяет проводить платежи в интернет-эквайринге.
PHP 7.4 and later. Should also work with PHP 8.0.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Sberbank\Api\AdditionalThreeDSServicesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$finish3ds_method_request = new \Sberbank\Model\Finish3dsMethodRequest(); // \Sberbank\Model\Finish3dsMethodRequest | Запрос завершения 3DS Method
$x_idempotency_key = 779165e0-1905-4edd-89fa-be46497b5044; // string | <span style=\"color:red;\">__Функционал обработки ключа идемпотентности находится в разработке__</span> Ключ идемпотентности запроса. Повторный вызов с тем же ключом вернет результат выполнения предыдущего запроса и не приведет к выполнению нового. Срок хранения ключей - 24 часа.
try {
$result = $apiInstance->finish3dsMethod($finish3ds_method_request, $x_idempotency_key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdditionalThreeDSServicesApi->finish3dsMethod: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://ecomtest.sberbank.ru
Class | Method | HTTP request | Description |
---|---|---|---|
AdditionalThreeDSServicesApi | finish3dsMethod | POST /ecomm/gw/partner/api/v1/finish3dsMethod.do | Завершение 3DS Method [finish3dsMethod] |
AdditionalThreeDSServicesApi | finish3dsPayment | POST /ecomm/gw/partner/api/v1/finish3dsPayment.do | Завершение аутентификации 3-D Secure [finish3dsPayment] |
BasicServicesApi | decline | POST /ecomm/gw/partner/api/v1/decline.do | Отмена заказа до начала платежа [decline] |
BasicServicesApi | deposit | POST /ecomm/gw/partner/api/v1/deposit.do | Завершение двухстадийного сценария [deposit] |
BasicServicesApi | getOrderStatusExtended | POST /ecomm/gw/partner/api/v1/getOrderStatusExtended.do | Получение информации о заказе [getOrderStatusExtended] |
BasicServicesApi | refund | POST /ecomm/gw/partner/api/v1/refund.do | Возврат средств Плательщика [refund] |
BasicServicesApi | register | POST /ecomm/gw/partner/api/v1/register.do | Регистрация заказа [register] |
BasicServicesApi | registerPreAuth | POST /ecomm/gw/partner/api/v1/registerPreAuth.do | Регистрация заказа для двухстадийного сценария [registerPreAuth] |
BasicServicesApi | reverse | POST /ecomm/gw/partner/api/v1/reverse.do | Отмена заказа [reverse] |
BindingServicesApi | bindCard | POST /ecomm/gw/partner/api/v1/bindCard.do | Активация связки Плательщика [bindCard] |
BindingServicesApi | getBindings | POST /ecomm/gw/partner/api/v1/getBindings.do | Получение связок по идентификатору Плательщика [getBindings] |
BindingServicesApi | getBindingsByCardOrId | POST /ecomm/gw/partner/api/v1/getBindingsByCardOrId.do | Получение связок по номеру карты или идентификатору связки Плательщика [getBindingsByCardOrId] |
BindingServicesApi | paymentOrderBinding | POST /ecomm/gw/partner/api/v1/paymentOrderBinding.do | Проведение оплаты по связке [paymentOrderBinding] |
BindingServicesApi | recurrentPayment | POST /ecomm/gw/partner/api/v1/recurrentPayment.do | Проведение периодического платежа [recurrentPayment] |
BindingServicesApi | unBindCard | POST /ecomm/gw/partner/api/v1/unbindCard.do | Деактивация связки Плательщика [unbindCard] |
CallbackServicesApi | bindingCallback | POST /bindingCallbackUrl | Уведомление о событии со связкой [bindingCallback] |
CallbackServicesApi | callback | POST /callbackUrl | Уведомление о проведении платежа [callback] |
CallbackServicesApi | receiptStatusCallback | POST /receiptStatusCallbackUrl | Уведомление о результате обработки чека [receiptStatusCallback] |
ChangePasswordServicesApi | generate | POST /ecomm/gw/partner/api/accounts/v1/apikey/generate | Генерация ключа Клиента для работы с сервисами платежного шлюза через SDK [generateApiKey] |
ChangePasswordServicesApi | setPermanentPassword | POST /ecomm/gw/partner/api/accounts/v1/set-permanent-password | Установка постоянного пароля [setPermanentPassword] |
FiscalizationServicesApi | doReceipt | POST /ecomm/gw/partner/api/ofd/v1/doReceipt | Создание чека [doReceipt] |
FiscalizationServicesApi | getReceiptStatus | POST /ecomm/gw/partner/api/ofd/v1/getReceiptStatus | Получение информации о результате обработки чека [getReceiptStatus] |
FiscalizationServicesApi | retryReceipt | POST /ecomm/gw/partner/api/ofd/v1/retryReceipt | Переотправка чека без изменения Корзины [retryReceipt] |
LoyaltyServicesApi | autoCompletion | POST /ecomm/gw/partner/api/v1/autoCompletion | Завершение двухстадийного сценария [autoCompletion] |
LoyaltyServicesApi | autoRefund | POST /ecomm/gw/partner/api/v1/autoRefund | Возврат средств Плательщика [autoRefund] |
LoyaltyServicesApi | getBindingsByCardOrId | POST /ecomm/gw/partner/api/v1/getLoyaltyBalance | Получение баланса бонусов Спасибо [getLoyaltyBalance] |
MirPayServicesApi | paymentDirect | POST /ecomm/gw/partner/api/v1/mir/paymentDirect.do | Проведение платежа с использованием прямого взаимодействия Клиента с MirPay [paymentDirectMirPay] |
PaymentServicesApi | paymentOrder | POST /ecomm/gw/partner/api/v1/paymentOrder.do | Проведение оплаты по карте [paymentOrder] |
PaymentServicesApi | paymentOrderBySubscription | POST /ecomm/gw/partner/api/v1/paymentOrderBySubscription | Проведение оплаты по подписке СБП [paymentOrderBySubscription] |
PaymentServicesApi | paymentSberPay | POST /ecomm/gw/partner/api/v1/paymentSberPay.do | Проведение оплаты через мобильное приложение "Сбербанк-Онлайн" [paymentSberPay] |
- AcsDecoupleIndicator
- AdditionalParams
- AttributesInner
- AutoCompletionRequest
- AutoCompletionResponse
- AutoRefundRequest
- AutoRefundResponse
- BankInfo
- BindCardRequest
- BindCardResponse
- BindingCallbackRequest
- BindingInfo
- BindingsInner
- CallbackRequest
- CardAuthInfo
- CardAuthInfoSecureAuthInfo
- CardAuthInfoSecureAuthInfoThreeDSInfo
- CardAuthInfoSecureCardInfo
- CartItems
- CartItemsItemsInner
- CartItemsItemsInnerAgentInfo
- CartItemsItemsInnerAgentInfoMoneyTransferOperator
- CartItemsItemsInnerAgentInfoPayingAgent
- CartItemsItemsInnerAgentInfoReceivePaymentsOperator
- CartItemsItemsInnerAgentInterest
- CartItemsItemsInnerDiscount
- CartItemsItemsInnerItemDetails
- CartItemsItemsInnerItemDetailsItemDetailsParamsInner
- CartItemsItemsInnerMarkCode
- CartItemsItemsInnerMarkQuantity
- CartItemsItemsInnerQuantity
- CartItemsItemsInnerSectoralItemPropsInner
- CartItemsItemsInnerSupplierInfo
- CartItemsItemsInnerTax
- CustomerDetails
- CustomerDetailsDeliveryInfo
- DataEntryModeAttributes
- DeclineRequest
- DeclineResponse
- DepositRequest
- DepositResponse
- DoReceiptRequest
- DoReceiptResponse
- ExternalParams
- ExternalRefundId
- Finish3dsMethodRequest
- Finish3dsMethodResponse
- Finish3dsPaymentRequest
- Finish3dsPaymentResponse
- FmConversionAttributes
- GenerateApikeyRequest
- GenerateApikeyResponse
- GetBindingsByCardOrIdRequest
- GetBindingsByCardOrIdRequestOneOf
- GetBindingsByCardOrIdRequestOneOf1
- GetBindingsByCardOrIdResponse
- GetBindingsRequest
- GetBindingsResponse
- GetLoyaltyBalanceRequest
- GetLoyaltyBalanceResponse
- GetOrderStatusExtendedRequest
- GetOrderStatusExtendedRequestOneOf
- GetOrderStatusExtendedRequestOneOf1
- GetOrderStatusExtendedResponse
- GetOrderStatusExtendedResponseAttributes
- GetReceiptStatusRequest
- GetReceiptStatusRequestOneOf
- GetReceiptStatusResponse
- KeyValue
- LoyaltyAttributes
- LoyaltyInfo
- LoyaltyInfoAwardBonus
- LoyaltyInfoPaymentBonus
- LoyaltyOperationsInner
- MerchantOrderParamsInner
- OperationsInner
- OrderBundle
- OrderBundleAdditionalUserProps
- OrderBundleCompany
- OrderBundleInstallments
- OrderBundleOperatingCheckProps
- OrderBundlePaymentsInner
- OrderBundleSectoralCheckPropsInner
- PayerData
- PaymentAmountInfo
- PaymentDirectRequest
- PaymentDirectRequestAdditionalParameters
- PaymentDirectResponse
- PaymentDirectResponseOrderStatus
- PaymentDirectResponseOrderStatusCardAuthInfo
- PaymentOrderBindingRequest
- PaymentOrderBindingRequestJsonParams
- PaymentOrderBindingResponse
- PaymentOrderBySubscriptionRequest
- PaymentOrderBySubscriptionResponse
- PaymentOrderRequest
- PaymentOrderRequestJsonParams
- PaymentOrderResponse
- PaymentPageAttributes
- PaymentSberPayRequest
- PaymentSberPayResponse
- QrAttributes
- ReceiptsInner
- ReceiptsInnerError
- ReceiptsInnerPayload
- RecurrentPaymentRequest
- RecurrentPaymentRequestAdditionalParameters
- RecurrentPaymentResponse
- RecurrentPaymentResponseData
- RecurrentPaymentResponseError
- RecurrentPaymentResponseOrderStatus
- RecurrentPaymentResponseOrderStatusCardAuthInfo
- RefundRequest
- RefundRequestJsonParams
- RefundResponse
- RegisterPreAuthRequest
- RegisterPreAuthRequestJsonParams
- RegisterRequest
- RegisterRequestJsonParams
- RegisterResponse
- RetryReceiptRequest
- RetryReceiptResponse
- RetryReceiptResponseRetryResultInner
- ReverseRequest
- ReverseResponse
- SBPSubscriptionResponse
- SberbankOnlineAttributes
- SetPermanentPasswordRequest
- SetPermanentPasswordResponse
- TdsAdditionalAttributes
- TdsApplicationAttributes
- TdsBrowserAttributes
- TdsDecoupledAttributes
- TdsDestinationNumberAttributes
- TdsExternalAttributes
- ThreeDSCompInd
- TransactionAttributesInner
- UnBindCardRequest
- UnBindCardResponse
Endpoints do not require authorization.
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.7
- Generator version:
7.6.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen