Fix 2Checkout Checkout Module Test Mode in ISC

Problem

2Checkout checkout module test mode will no longer work as 2Checkout changed from using ‘demo’ field to live production checkout URL to a separated sandbox sale URL as ‘https://sandbox.2checkout.com/checkout/purchase’ now

You will see Error Code: PE102 when doing ‘Test Mode’ checkout.

Solution

In /modules/checkout/2checkout/module.2checkout.php (line 154)

Find

$this->RedirectToProvider('https://www.2checkout.com/2co/buyer/purchase', $hiddenFields);

Replace

if($testmode_on == "YES") {<br>
    $this->RedirectToProvider('https://sandbox.2checkout.com/checkout/purchase', $hiddenFields);<br>
}else{<br>
    $this->RedirectToProvider('https://www.2checkout.com/2co/buyer/purchase', $hiddenFields);<br>
}

Reference

Leave a Reply

Your email address will not be published. Required fields are marked *