Search code examples
paypalpaypal-sandboxdonations

Can I make a fake PayPal donate button in the SandBox for testing?


I would like to set up a fake donate page using a PayPal donate button that goes to a sandbox account. Is this possible?


Solution

  • You need to register this page: https://developer.paypal.com/

    Then you can use the paypal API like this:

    <html>
    <head>
    <title>Test Page</title>
    </head>
    <body>
    
    <p>This is a test HTML file.</p>
    
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----...[Encrypted message]...-----END PKCS7-----">
    
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
    
    </form>
    
    </body>
    </html>