Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Can't enable gateway #1

Closed
mashour06 opened this issue Sep 15, 2023 · 14 comments
Closed

Can't enable gateway #1

mashour06 opened this issue Sep 15, 2023 · 14 comments

Comments

@mashour06
Copy link

Hello Sir,
I'm trying to enable Woocommerce-gateway-stcpay payment gateway, I set up the plugin and activated it. but when I try to enable the gateway on woocommerce->settings->payment it gets disabled again, and it doesn't show on the checkout page. I entered all info required like merchant ID... etc.
Any help to solve the problem would be greatly appreciated. Thanks in advance.

@shazzad
Copy link
Owner

shazzad commented Sep 15, 2023

Did you configured ssl key & certificate file path ?

@mashour06
Copy link
Author

mashour06 commented Sep 15, 2023

Hello Sir,
Thank you for your reply. I can now enable the gateway after entering the private key file (this one was missing). But there is another issue, there is an error message stating that: "Could not process your request. Please try later, or use other payment gateway". The log file gives me the following error:
2023-09-15T12:12:13+00:00 INFO Stcpay API Error: cURL error 58: could not load PEM client certificate, OpenSSL error error:0909006C:PEM routines:get_name:no start line, (no key found, wrong pass phrase, or wrong file format?).
I have a .pfx file which I entered its path too. the merchant ID is correct. I tested every thing in postman and every thing is working properly. but from the website it's not working. I'm testing on localhost.

shazzad added a commit that referenced this issue Sep 15, 2023
@shazzad
Copy link
Owner

shazzad commented Sep 15, 2023

I have removed the ssl certificate dependency. Try removing the ssl certificate setting fields value.

@mashour06
Copy link
Author

I removed the values for the following fields:
Production SSL Cert File
Production SSL Key File
Production SSL Key Password
But unfortunately the problem didn't resolve. Now I get this log error:
INFO Stcpay API Error: Invalid merchant id or ssl certificates

@shazzad
Copy link
Owner

shazzad commented Sep 15, 2023

In that case stcpay gateway still requires the ssl certificate files to be defined.

Then you should try to debug your ssl certificate based on the error log you received earlier.
Reference: https://stackoverflow.com/a/63042717

@mashour06
Copy link
Author

Sir, I entered the path to pfx file like this:
C:\wamp64\www\asfarok_2_9_2023\wp-content\plugins\woocommerce-gateway-stcpay\pfx\asfarokPfx.pfx
Is entering an absolute path like this correct? I'm working on localhost on windows machine.

@mashour06
Copy link
Author

I changed the pfx file to .pem file and the payment completed without entering the OTP that has been sent to the mobile. the system didn't give me any thing to enter the OTP and the payment completed. What is the problem and how to solve it?

@mashour06
Copy link
Author

Any help would be greatly appreciated.

@shazzad
Copy link
Owner

shazzad commented Sep 17, 2023

Can you shot a video of the whole checkout process ? As far i remember, the OTP should be entered on stcpay hosted confirmation page.

This plugin was developer few years ago, and not maintained with the latest changes.

@mashour06
Copy link
Author

Hello Sir,
Here is the video and image, the image is a screenshot from the mobile phone with 2 messages: a message with the OTP code, and the other message is indicating that the payment was approved and the order placed (directly without entering the OTP code), and there was no field appeared to enter the OTP code.

stc-video.mp4

stcpay

@mashour06
Copy link
Author

Hello,
Did you find any solution?

@amrith-am
Copy link

INFO Stcpay API Error: cURL error 6: Could not resolve host: b2btest.stcpay.com.sa

@amrith-am
Copy link

I got this error

@shazzad
Copy link
Owner

shazzad commented Feb 7, 2024

The error indicates that their testing server url has changed. Please contact with them for the new URL.

Also, it's been a while since this plugin was last updated. If they make changes to their api, the plugin won't work without modification.

@shazzad shazzad closed this as completed Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants