Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Webiondev123's avatar

How can you test PHP payment system ?

How can I test the PHP payment system which once card details are entered directs to bank payment gateway?

0 likes
2 replies
jlrdw's avatar

First make sure you are doing all leagally.

What I did is myself and I had a couple of other folks purchase a small thing $2.00 or under for testing, and to work out bugs. Just my 2 cents.

Thyrosis's avatar

Most payment systems will offer a test environment to have your develop deployment talk to.

So in your .env file you would use the testing API keys, and then in your production .env you will use the 'real' keys.

Lacking those, just create a fake product for 1cent and buy as much as you want! Do mind the costs the payment provider charge for handling transactions ;)

Please or to participate in this conversation.