Paypal Intergration


Im gonna have web-hosting of sub-domains on my website, costing a certain amount per 2 month basis…
I intended to use the PayPal subscription and recurring payment buttons, but after creating the button, etc, There is an easy way for the user to pretend they have paid for the item by entering the sucessful url (where my PHP scripts process the rest of the order)

What I need is a way to use PHP scripts to validate that payment was completed (not nessicarly recieved)
Im bad with programming and explaining, but I have provided a rough example to what I need to happen…

If payed.Result = “VALID” Then = "…/sucessful.html"
If payed.Result = “INVALID” then = "…/failed.html"
end if
end if

So basically, the user fills out a form of HTML I have already made, then the user chooses the hosting plan (outa 4), they then are displayed the corrosponding paypal subscription button, where they complete payment via paypal, they are then Automatically redirected to a PHP script, which needs to actualy check weather payment was completed, if so, then send the filled out HTML form (in a temp mysql database) to an email address of mine, so I can setup the server…If payment was not made, then they are redirect to a page which rejects their order and explains why etc…
The problem is, creating the PHP script to be able to check if payment was even made…

I TRYED IPN, Ive got the script from but I have no idea how to set it up…
Or how to setup the tables in MySql…

I was hoping someone could help me do this, setup paypal correctly.

Thanks Guys
I await replys

I struggled around one month to have my PayPal properly setup last time. Hope I can help you to setup yours.

You need PayPal IPN. I believe you already find the PHP scripts. Here are some tips for you:

  1. You can test your PayPal payment at
    2. You need to enable IPN in your PayPal account first.
  2. You need to tell PayPal the url link of your IPN file. It should be something like ipn.php

I’ll suggest you to read the official document from PayPal and always test your script in

Below is my codes for your reference.

> [b][/b] [color=#CC0000][i]The url link of your actual ipn file[/i][/color] [b][/b] [color=#CC0000][i]The url link of your file where you check whether the transaction is successfully done[/i][/color] [b][/b] [color=#CC0000][i]The url link of your file when customer cancel the payment half way[/i][/color]

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here

that helped a lot actualy…
So the redirect of the paypal button would be the ipn script?
and in…
My Account>Profile>IPN does it also lead to the ipn script?

This is what ive gotten so far for my paypal button…does it appear correct?

ok, so how do I test it in the sandbox? Ive made an account…
Or can I not test my website side of the processing in sandbox?

You need to change


Please read the instruction from sandbox.

With sandbox, you can test your success and fail page without paying anything.

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here