Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

paypal api/code for directory listing

Status
Not open for further replies.
Joined
Jan 19, 2007
Posts
2,207
Reaction score
47
I have a self-made directory script. It's pretty basic and doesn't allow people to edit their listings once submitted. After they submit their details, I have to manually go into the mysql table and change a field from pending to active - for the listing to be made public. Despite how basic it is, I really like it. It seo's pretty well, the design fits my sites, it shows a map of the business and company logo etc.

I started to think about another project I might use this script for, and i started thinking about how to charge for listings.

I know that there are full scripts out there that do recurring payments through PayPal, but I really want to stick with and build on what I have. Does anyone have any experience of this?

The listing fee might be £5 and then a recurring fee of £1/year for example, ideally through PayPal.

As I think through the idea i know that one way would be to handle this manually by setting up a PayPal form after they submit their listing and then later cross referencing and having another field in the database that I'd change to "paid". But this would be annoying to control, especially for £1 each time.

Was wondering if there are any simple scripts that allow me to connect at the time to PayPal, process the transaction and then update my database, informing the business that their listing is paid for. Either for the year or a recurring payment?

Thanks for any help.
 
There's sample API callback scripts on the PayPal API developers site, you do a simple handshake with PayPal and they confirm the payment has processed OK. If setup correctly, then you'll get notification for button payments and subscriptions.

If you add a custom field to the PayPal link / button this can be passed back to you in the "handshake", you can then use this as the lookup to your database code to flip the paid flag. A better option might be to hold the paid date so you can run a daily / weekly query for all renewals or even use this in a query when displaying results on the site.

Hope this helps without getting too deep into actual code.
 
Thanks Monaghan - huge help. Especially the sample scripts. Will spend some time on this over the next couple of days.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom