Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Using paypal

  1. #1
    Regular Coder CurtWRC's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    224
    Thanks
    9
    Thanked 1 Time in 1 Post

    Using paypal

    Hi,

    I have a website where users can add products to a basket. Then when they are finished shopping they can continue to checkout where it redirects them to paypal. Once they have paid for the products on PayPal they are sent to a confirmation page on PayPal where it says 'Click here to return to {SITE NAME}'. When they are returned to the site it sends a post form so I can work out whether the payment was successful and therefore change the order record in the database accordingly.

    However if they don't click on 'Click here to return to {SITE NAME}' even if they have paid I have no way of knowing whether the payment was successful causing an inconsistency. My question is how can I skip the step on PayPal where it asks if the user would like to return to the site and just automatically redirect them?

    Cheers,
    Curt.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You might need to do some editing but this might help.
    http://www.pdncommunity.com/pdn/boar...message.id=368
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder CurtWRC's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    224
    Thanks
    9
    Thanked 1 Time in 1 Post
    Thanks for your reply. Is there a simple way of doing this? I mean can I add something like this to my existing code:

    <form method="post" action="https://www.paypal.com/cgi-bin/webscr">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="my@email.com">
    <input type="hidden" name="item_name" value="Item name">
    <input type="hidden" name="item_number" value="1234">
    <input type="hidden" name="amount" value="19.95">
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" value="Redirect" value="automatically">
    <input type="submit" value="Buy Now">
    </form>

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to read that article carefully. It tells you what you need to do to get things to work. The issue at hand is how the system handles the payments. Whether it uses PDT or IPN.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    Curt ...

    If you haven't already, look into PayPal's free development website (the "sandbox").

    This is a great PayPal feature that lets you create two test accounts ... the "buyer",
    and the "seller". You actually can test your whole script exactly like a real PayPal
    account, including actual credit card transactions, using a make-believe credit card.

    Everything about it looks like a "real" PayPal account, but it's only for testing, so
    the transactions are not real. They also have many good examples and snippets of
    code for developers. Once you get your scripts working perfectly, you switch your
    PayPal id to your REAL PayPal account.

    This is a "must-have" for PayPal developers.

    https://developer.paypal.com/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •