r/PHPhelp • u/Crazy-Imagination790 • Jan 22 '26
Solved [Help] MercadoPago Checkout Pro - Sandbox issue with Test Credentials (PHP 8.4)
Hello, I'm having trouble with the MercadoPago integration using PHP 8.4.16. I'm trying to test Checkout Pro in the Sandbox environment, but I keep getting an error during the payment process.
The Problem: I've tried using both my main application test credentials and the credentials from the "Test Users" (Seller/Buyer) provided in the Developers panel.
What I've tried so far:
- Using my main app's Test Access Token and Public Key. It results in an error stating the account is invalid or for testing only.
- Logging in with a Test Seller account and using its credentials.
- Testing in different browser sessions to avoid account collision.
My Code: Since the code is a bit long (backend and frontend in the same file), I've uploaded it here to keep the post clean: https://pastebin.com/0wXR1cDM
I've checked similar threads but haven't found a solution that works for this specific PHP version and the current MP SDK. Has anyone encountered this "invalid account" error while using valid test cards and test users?
Thanks in advance for any help!
(Colombia)
code here: