[#1185] SBPay Custom Payment Processor - Where is the API Data at??

Migrated from Redmine #1185 | Author: Marcelo Silva
Status: Feedback | Priority: Normal | Created: 2024-03-01


Hello, I am trying to integrate a custom payment processor with SBPay however I can’t even find the API Data anywhere on the SBPay dashboard.

How would I go about to get the TOKEN, SECRET and Merchant requested here: sbpay-sdk/example/custom_payment_processor/config.php at main · dimkasb/sbpay-sdk · GitHub

This is my first time using SBPay and can’t find much information.

Thank you

Dmytro Bondarev wrote:

Hi, please make admin user in sbpay, then login and you will be able to get API keys.

Marcelo Silva wrote:

Dmytro Bondarev wrote:

Hi, please make admin user in sbpay, then login and you will be able to get API keys.

Hello, I did that now, thank you so much.
However, I am getting an error 500 (Signature is not set), when using those credentials.

Just to make sure I am doing it properly:

SBPAY_MERCHANT is what exactly? I tried both the subdomain and the user login.
SBPAY_HOST is the subdomain that I use on sbpay.me or the default one (app.sbpay.me)?

And another thing I am not sure is working properly is that in the integration it says the client is gonna be redirected to the form page using POST method, but it’s being redirected using a GET.

Thank you in advance for all the help.

Marcelo Silva wrote:

Marcelo Silva wrote:

Dmytro Bondarev wrote:

Hi, please make admin user in sbpay, then login and you will be able to get API keys.

Hello, I did that now, thank you so much.
However, I am getting an error 500 (Signature is not set), when using those credentials.

Just to make sure I am doing it properly:

SBPAY_MERCHANT is what exactly? I tried both the subdomain and the user login.
SBPAY_HOST is the subdomain that I use on sbpay.me or the default one (app.sbpay.me)?

And another thing I am not sure is working properly is that in the integration it says the client is gonna be redirected to the form page using POST method, but it’s being redirected using a GET.

Thank you in advance for all the help.

From what I was able to check in the code, the issue seems to be related to what I mentioned that the redirection is not being done using POST but rather a GET, which is not carrying any data.

Dmytro Bondarev wrote:

Hi, could you please clarify if you use SDK or you are making http request by yourself?
It looks like you are making requests to http:// instead of https://

Marcelo Silva wrote:

Dmytro Bondarev wrote:

Hi, could you please clarify if you use SDK or you are making http request by yourself?
It looks like you are making requests to http:// instead of https://

Hello, I am using the SDK. Seems like the issue was related to it being in local development, I have passed everything to an actual online host and it seems to be all good now.
Thank you so much and have a great weekend!

Marcelo Silva wrote:

Dmytro Bondarev wrote:

Hi, could you please clarify if you use SDK or you are making http request by yourself?
It looks like you are making requests to http:// instead of https://

Hello, I am currently implementing the callback from my payment gateway and I noticed there is a getOrder method in the php-sdk, however, the route is return as invalid and it also doesn’t show said route (GET /order/{id}) in the documentation.

Has this route been discontinued from the API? And if so, is there any alternative to getting the order information. Thank you

Marcelo Silva wrote:

Scratch that last! It’s all working good now, seems like I was using the wrong url.

This can be closed! Thank you so much