Answer the question
In order to leave comments, you need to log in
Connection of the SberBank payment gateway. How to implement connection?
There was a task - to connect the payment gateway of Sberbank on the online store. Tell us the basic principles of connection? Where to lay out what? How to work with https://3dsec.sberbank.ru/payment/merchants/****/p... Nuances of forms, etc.
Answer the question
In order to leave comments, you need to log in
Recently faced the same problem. For some reason, Sberbank does not make libraries for working with its API, like all normal payment gateways. And their API is absolutely insane. There is no documentation in the public domain, some pdfs were sent in a letter. As a result, I made a small library in PHP https://github.com/voronkovich/sberbank-acquiring-... I hope it will be useful to someone else.
they have 2 methods WebService-ah and REST.
about REST in a nutshell. a POST or GET request is sent in the form https://3dsec.sberbank.ru/payment?user&password&number... if the request is correct, we receive a link to the payment page in response.
if you conclude an agreement with them, they will send you documentation where everything is superficially written (the documentation is designed for an experienced webmaster, although juniors can figure it out with Google). and will give test access and "manager".
Client for Sberbank API, as part of https://omnipay.thephpleague.com/
https://github.com/AndrewNovikof/omnipay-sberbank
In the process of integrating sbercredit. Similar problems.
In the documentation, strange-looking requests, neither http_build_query nor key-value substitution gives such requests.
Plus GET requests, but with the requirement of the application/x-www-form-urlencoded POST header) The
examples of POST requests in the documentation are inadequate, and it was not possible to start them in any form.
It turned out that the API only accepts GET, and http_build_query is enough.
The problem was in the documentation: requests were made according to their documentation, but ... nothing worked. And the API doesn't know how to say anything but system error)
I disassembled their API piece by piece, it turned out that it doesn't match the documentation much - many optional fields are in fact required.
Now the next circle of hell: the API accepts the request, sends data to go to the gateway, but ... now the gateway gives errors in the web interface)
It turned out that the muasure field was required. At the same time, in the documentation in the request examples, it is empty, and the API does not issue errors on an empty field. So it goes.
In order to test payment, you must use test cards. If you use a real card, then nothing will happen on the payment page
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question