Results 1 to 8 of 8

Thread: Need some help with paypal (sandbox) and php

  1. #1
    Join Date
    Apr 2010
    Posts
    30

    Need some help with paypal (sandbox) and php

    I am looking for a solution where you can pay XX, so you get XX amount on account of mind. I searched a bit on the internet until I came across a place where a guy said you could download a finished script from paypal.sourceforge.net, then create a developer account with paypal sandbox for testing.

    Are there others here who have tested the same system, who can tell me what I have done wrong? The payment, etc works fine, but I can not give up information about the buyer after he has paid and transferred to the "Success.php" which may make it difficult and add XX amount till account info page does not arrive from paypal ? I have read through the readme file, so am pretty sure that the config file should be properly set.

  2. #2
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Need some help with paypal (sandbox) and php

    I do not know the script that you refer to, so it is impossible to say anything about it.

    But in those cases I've seen PayPal with PHP then the flow is as follows:
    - The user is on the website of the company
    - The customer chooses which Part h * n wants to buy
    - The user is redirected to PayPal's payment site
    - User logs in or fill in payment information
    - PayPal payment processing and displays either a PayPal page or send the user back to the company
    - PayPal contacting a script on the website of the company to inform them about the payment was successful, interrupted, not approved, etc., the currency in which it was paid and the sum. It used Paypal IPN.

  3. #3
    Join Date
    Apr 2010
    Posts
    30

    Re: Need some help with paypal (sandbox) and php

    Thanks for the reply. Yes, the script I use has a solution, together with the IPN that you are talking about. What's the deal is the script works fine. If you cancel your order from PayPal, you will be sent back to the cancellation page that is on my host. Same when the order is accepted, then sent them to the "I Accept" my page. But paypal is not sending information from the buyer of the last "acceptable" side.

    Booking form that comes with the script has a field of First Name, Last Name, Address 1, Address 2, City, State, Zip, Email, Phone, Item Name, Item Number, Size, Color, Amount, Quantity, Shipping Amount, and Tax; and has a Submit Query and a Reset button.

    The information I put in there will be submitted to the first paypalsiden where to pay. But do not look like the information sent back to my host again, after the payment is accepted. Possibly it's just a little user error on my part, but would appreciate if anyone has good knowledge of script

  4. #4
    Join Date
    Nov 2008
    Posts
    1,054

    Re: Need some help with paypal (sandbox) and php

    These scripts are from 2004 and what happens is again the only checks remaining payment is verified or not. To get information to your site, you are nuts to code something yourself in the file ipn_success.php.

  5. #5
    Join Date
    Apr 2010
    Posts
    30

    Re: Need some help with paypal (sandbox) and php

    Hmm ok .. in sucess.php, then it says at least

    HTML Code:
    <td width="20%" bgcolor="#EEEEEE"> First Name: </td>
                            <td width="80%" bgcolor="#EEEEEE"> 
                               <?=$_POST[first_name]?>
                            </td>
                         </tr>
    It was the name of the buyer that was automatically filled in there from paypal. The ipn_success.php are relatively empty

    PHP Code:
    <?php
    /*
     * ipn_success.php
     *
     * PHP Toolkit for PayPal v0.51
     * http://www.paypal.com/pdn
     *
     * Copyright © 2004 PayPal Inc
     *
     * Released under Common Public License 1.0
     * http://opensource.org/licenses/cpl.php
     *
     */
    //include file - not accessible directly
    if(isset($paypal['business']))
    {
    //log successful transaction to file or database

    }
    else
    {
            die(
    'This page is not directly accessible');
    }
    ?>

  6. #6
    Join Date
    Nov 2008
    Posts
    1,054

    Re: Need some help with paypal (sandbox) and php

    It is in the file you need to code themselves, to check on them actually use your paypal user to pay. Created once paypal script that would be used to purchase Credits to a Counter Strike Source RPG server. There, I did the mistake, and someone exploited it. Payment was then Ok and Credits were given out. Then I found out again it had changed the payment to an address other, and subsequently the script used.

  7. #7
    Join Date
    Apr 2010
    Posts
    30

    Re: Need some help with paypal (sandbox) and php

    You have not accidentally left a script that you want to share? To use it for some of the same as you did. Only here you should be able to buy "points" to a "wannabe appstore" I have coded in a different program. Possibly a place where I can find a simple setup? As mentioned, I can announce basic php, so code things from scratch is not entirely appropriate. But thanks for the input guys

  8. #8
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Need some help with paypal (sandbox) and php

    The whole point is that whether a transaction is completed or not being communicated via IPN. Paypal will then connect with what you have set up the IPN goals, and send a given set of variables that contain information you need to check. Never, never, never take for granted that when this script is run as the payment is completed.

    1. The first thing to check is the recipient of the payment (and IPN message) is you and your Paypal account. Is not it nice so you can ignore the message.
    2. The second thing you must do is to check that the message is genuine and not modified along the way to giving false information/results. This is done by the message sent back to PayPal who then confirm or disprove that the message is from them, and that it is unchanged.
    3. Only now check what the message says. Here, you must then check the status, sum, product, and everything else that is relevant to you. In addition, it pays and that you check that the pay is the same as you have registered. The best thing here is that you create a system that makes it not important that your user and the payer of the goods is the same person. For example, you can use two different email addresses, and then you miss out a transaction you should have with you automatically. You will obviously not go of the transaction, literally, but you will not be able to connect your payment to your user correctly if you do it right. Here I tend to send Paypal user ID when the user wants to pay, then check the user ID to the database when the IPN message will be returned with the status of your payment.
    4. Save the necessary data in the database so that you have registered there that the user has paid.

Similar Threads

  1. Co-op sandbox map in Portal 2
    By Ushakanta in forum Video Games
    Replies: 4
    Last Post: 26-04-2011, 02:30 PM
  2. I want to know how does a sandbox work
    By oRSON bEAN in forum Networking & Security
    Replies: 5
    Last Post: 04-01-2011, 12:13 AM
  3. Paypal Auto Return issues in sandbox
    By Dingbang in forum Technology & Internet
    Replies: 6
    Last Post: 26-07-2010, 03:08 PM
  4. Tips for creating PayPal Sandbox account
    By Head-Hunter in forum Tips & Tweaks
    Replies: 2
    Last Post: 24-07-2010, 01:57 PM
  5. crysis sandbox fix
    By Max_Miraa in forum Video Games
    Replies: 3
    Last Post: 08-06-2009, 11:58 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,573,843.70850 seconds with 17 queries