Sugumar Venkatesan
Sugumar Venkatesan

Reputation: 4038

2Checkout sandbox error

I am trying the 2checkout sandbox account but if I submit the form it shows error ERROR CODE:PE102, but if I change the action attribute value to https://www.2checkout.com/checkout/purchase it works fine.

I want to test checkout.

The following is my form

<form action="https://sandbox.2checkout.com/checkout/purchase" method="post">
            <input name="sid" type="hidden" value="32480392840983"><!--901260471-->
            <input name="mode" type="hidden" value="2CO">
            <input type='hidden' name='currency_code' value='INR'>

            <input name="return_url" type="hidden" value="{$sitepath}{$packagereturn}">

            <input name="li_0_name" type="hidden" value="{$adtype}">
            <input name="li_0_price" type="hidden" value="{$pkamount}">

            <input name="custom_currency_code" type="hidden" value="INR">
            <input name="custom_adtype" type="hidden" value="{$adtype}">
            <input name="custom_noofads" type="hidden" value="{$noofads}">
            <input name="custom_userid" type="hidden" value="{$pkuserid}">
            <input name="custom_username" type="hidden" value="{$userdetails[0].user_name}">
            <input name="custom_city" type="hidden" value="{$userdetails[0].user_city}">
            <input name="custom_state" type="hidden" value="{$userdetails[0].user_region}">
            <input name="custom_zip" type="hidden" value="{$userdetails[0].user_postcode}">
            <input name="custom_email" type="hidden" value="{$userdetails[0].user_email}">
            <input name="custom_phone" type="hidden" value="{$userdetails[0].user_phone}">
            <input name="custom_date" type="hidden" value="{$custom_date}">
            <input name="custom_validmonths" type="hidden" value="{$validmonths}">



            {*user details *}
            <input name="card_holder_name" type="hidden" value="{$userdetails[0].user_name}">
            <input name="street_address" type="hidden" value="{$userdetails[0].user_address}">
            <input name="city" type="hidden" value="{$userdetails[0].user_city}">
            <input name="state" type="hidden" value="{$userdetails[0].user_region}">
            <input name="zip" type="hidden" value="{$userdetails[0].user_postcode}">
            <input name="email" type="hidden" value="{$userdetails[0].user_email}">
            <input name="phone" type="hidden" value="{$userdetails[0].user_phone}">
            <input type="image" id="payCheckout" name="submit_x" src="images/Buy-Now-button.jpg" width="145" height="69" border="0" />

          </form>

Upvotes: 1

Views: 705

Answers (1)

wtrmLn
wtrmLn

Reputation: 121

The sid parameter is expecting a 9 digit account ID. You have commented out the sandbox sid and have a longer non-account number entered as the value. Try using "901260471" as the value for sid and test once more.

Upvotes: 2

Related Questions