developer sandbox

MrKMW
New Community Member

I am trying to do a test in PayPal developer sandbox.

When I use the following code it brings me to the correct page.

    <!-- SPECIFY the type of button - THIS CODE WORKS  -->
    <input type="hidden" NAME="cmd" value="_donations">
    <input type="hidden" NAME="hosted_button_id" value="QNTJ7MSKQXP58">
    <input type="hidden" NAME="no_shipping" value="1">

When I try the following code it brings me to the PayPal Log-in page.

<!-- SPECIFY the type of button - THIS CODE DOES NOT WORK -->
    IT BRINGS ME TO PAYPAL LOG-IN PAGE
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" NAME="no_shipping" value="1">

When I try the Buy Now button code it does not work. It brings me to an error page.

Error Detected Error Message PayPal cannot process this transaction because of a problem with the seller's website. Please contact the seller directly to resolve this problem.

<!-- SPECIFY the type of button - THIS CODE DOES NOT WORK -->
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="ZZE242VSVCF8S">
    <input type="hidden" NAME="no_shipping" value="1">

Here is the entire code for review. It's got to be something simple I'm overlooking. Any help would be appreciated.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Test-PayPal</title>

    <script>    
        function init(){            
            document.forms['book_order'].submit();
        }       
        window.onload = init;
    </script>

</head>

<body>

    <!-- START: DONATION ONE-TIME -->

    <form name="book_order" id="book_order" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

        <input type="hidden" id="p1_business" NAME="business" value="facilitator email">

    <!-- SPECIFY the type of button - THIS CODE WORKS  
        <input type="hidden" NAME="cmd" value="_donations">
        <input type="hidden" NAME="hosted_button_id" value="QNTJ7MSKQXP58">
        <input type="hidden" NAME="no_shipping" value="1">
    -->     

    <!-- SPECIFY the type of button - THIS CODE DOES NOT WORK
        IT BRINGS ME TO PAYPAL LOG-IN PAGE
        <input type="hidden" name="cmd" value="_xclick">
        <input type="hidden" NAME="no_shipping" value="1">
    --> 
    <!-- SPECIFY the type of button - THIS CODE DOES NOT WORK -->
        <input type="hidden" name="cmd" value="_s-xclick">
        <input type="hidden" name="hosted_button_id" value="ZZE242VSVCF8S">
        <input type="hidden" NAME="no_shipping" value="1">

    <!-- SPECIFY redirect details if they cancel payment checkout. -->
        <input type="hidden" NAME="cancel_return" value="http://pjwfglobal.org/projects.html">

    <!-- Specify redirect details after payment success. -->
        <input type="hidden" NAME="return" value="http://pjwfglobal.org/thank-you.html">

    <!-- SPECIFY Customer Data -->
        <INPUT TYPE="hidden" id="p1_first_name" NAME="first_name" VALUE="John">
        <INPUT TYPE="hidden" id="p1_last_name" NAME="last_name" VALUE="Doe">
        <INPUT TYPE="hidden" id="p1_address1" NAME="address1" VALUE="123 Easy Street">
        <INPUT TYPE="hidden" id="p1_address2" NAME="address2" VALUE="">
        <INPUT TYPE="hidden" id="p1_city" NAME="city" VALUE="My City">
        <INPUT TYPE="hidden" id="p1_state" NAME="state" VALUE="MyState">
        <INPUT TYPE="hidden" id="p1_zip" NAME="zip" VALUE="12345">
        <INPUT TYPE="hidden" NAME="lc" VALUE="US">
        <INPUT TYPE="hidden" id="p1_email" NAME="email" VALUE="myemail">
        <INPUT TYPE="hidden" id="p1_night_phone_a" NAME="night_phone_a" VALUE="123">
        <INPUT TYPE="hidden" id="p1_night_phone_b" NAME="night_phone_b" VALUE="456">
        <INPUT TYPE="hidden" id="p1_night_phone_c" NAME="night_phone_c" VALUE="7890">

    <!-- SPECIFY Donation Amount -->
        <INPUT TYPE="hidden" id="p1_item_name" NAME="item_name" VALUE="My Item">
        <INPUT TYPE="hidden" id="p1_amount" NAME="amount" VALUE="20.00">
        <input type="hidden" id="bo_quantity" NAME="quantity" value="1">

    </form>
</body>
</html>

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.