With 2Checkout, you can place a demo sale by changing your account setting to "On" on the site management page in your 2Checkout account. Once this is installed, you will see a message at the top of the verification page stating that this is a demo sale. If your account is currently used for real-time sales, you can place a demo sale by changing the demo account setting to βParameterβ, and then pass the additional parameter βdemoβ with a value of βYβ. Thus, your sales in real time will not be interrupted.
Example:
https://www.2checkout.com/checkout/spurchase?sid=1303908&mode=2CO&li_0_type=product&li_0_price=1.00&li_0_quantity=1&li_0_name=Example+Product+Name&demo=Y
It should be noted that when placing demo sales, the MD5 hash returned by 2Checkout is intentionally violated by calculating the hash from 1 for the order number, so if you check the hash, you need to return the script to return to this change.
Example:
<?php if ($_REQUEST['demo'] == 'Y') { $order_number = 1; } else { $order_number = $_REQUEST['order_number']; } $compare_string = $_REQUEST['secret_word'] . $_REQUEST['sid'] . $order_number . $_REQUEST['total']; $compare_hash1 = strtoupper(md5($compare_string)); $compare_hash2 = $_REQUEST['key']; if ($compare_hash1 != $compare_hash2) { echo "Hash Mismatch"; } else { echo "Hash Matched"; }
INS messages are not sent for demo sales, so if you also use the instant notification service (INS), you can use the INS testing tool to simulate the INS messages you are listening to.
Please feel free to also contact techsupport@2checkout.com if you need help testing your integration.
source share