Web Design Forum: Paypal Payment Fail or Success PHP - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Paypal Payment Fail or Success PHP how to find out if payment was successful Rate Topic: -----

#1 User is offline   Tex0gen 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 03-July 08
  • Reputation: 0
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 01 December 2011 - 01:49 PM

Hi there, iv setup paypal buttons to purchase a service that needs to be activated if the payment was successfull. However i am unsure how to check if payment failed or not. If anyone can give me some clear advice on how this would be done, it would be greatly appreciated.
0

#2 User is offline   skidz 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,047
  • Joined: 24-November 08
  • Reputation: 135
  • Gender:Male
  • Location:Derby
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 01 December 2011 - 02:07 PM

You'll need to read up on paypal IPN (Instant Payment Notification). Once a payment is complete, paypal IPN will provide a silent callback, which is what you need.

This website might be able to help https://www.paypaltech.com/SG2/
2

#3 User is offline   Tex0gen 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 03-July 08
  • Reputation: 0
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 01 December 2011 - 02:15 PM

Thank you very much, iv created the custom script you get at the end, but what do i do with that now?
0

#4 User is offline   skidz 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,047
  • Joined: 24-November 08
  • Reputation: 135
  • Gender:Male
  • Location:Derby
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 01 December 2011 - 02:19 PM

Read up on IPN and you should be able to work out everything you know, it's not difficult.

http://designertuts....eb-application/
1

#5 User is offline   Tex0gen 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 03-July 08
  • Reputation: 0
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 01 December 2011 - 02:24 PM

Think iv just got it. Nice one, thanks very much for all your help!!
0

#6 User is offline   tuktuk 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 10-December 11
  • Reputation: 0

Posted 10 December 2011 - 04:52 PM

peypal is a fantastic media to received online payment.
0

#7 User is online   rallport 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 3,818
  • Joined: 03-January 10
  • Reputation: 266
  • Gender:Male
  • Location:England, UK
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 10 December 2011 - 05:29 PM

A few rules for IPN:

  • Try to avoid specifying your callback urls within hidden forms fields - that will lead to abuse. I've come across sites where I can confirm an order and recieve a order paid email simply from viewing the source on the payment pages and pasting the ipn callback url into the browser - not a good thing really! :)
  • IF you do specify urls in your form as hidden fields, for the love of all things holy, don't rely on querystring data E.g. do not have your ipn url like: site.com/ipn.php?ConfirmOrderRef=123456789
  • During the IPN script do check the data PayPal sends you it was you expect. So check if the order id exists, check that amounts mtahc, check the payment status
  • IF you are using the same PayPal account for multiple purposes be very warey. For example, if using it for eBay too you'll notice a "for_auction" variable get sent back - you'll most likely want to filter thewse out - there are a few more payment types
  • Check the referer - this should really only be PayPal for your purposes
  • Check the IPN version - these do change sometimes
I'd highly advise sitting down and having a good read through the IPN variables - as PayPal do quite a good job of explaining them - avoid just downloading a script






0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users