• 0

[PHP] Detecting if Paypal payment has been made


Question

Hi

I'm looking for a way to automatically "temporatily suspend" hosting accounts that have not paid within 14 days of their invoice date.

What I currently have setup (i havent actually placed it live for customers yet as i want to get all of the bugs sorted, and I need to transfer current customers over) is a custom account management website (which allows customers to view their packages, add more packages, upgrade, send a support ticket etc), but i wanted to keep it seperate from their Cpanel accounts, so they cannot manage their actual account from there (what they do in cpanel is kept in cpanel).

The setup script currently uses WHM and Paypal's APIs to determine if payment has been made for the order, and then create the account instantly in WHM. The problem with the system at the moment. The script automatically creates an account in cpanel and in the account management website, but past that, they are kept seperate.

I know that I can use the WHM API to suspend the accounts, but I don't know what's the easiest way to detect which accounts havent been paid - if you catch my drift. There's going to be different tier packages (free to ?19.99) - and it will also need to detect if the correct amount has been paid (I suppose it can grab the price from the database).

edit: forgot to add that I want to continue using this system, rather than adopt a pre-made account management script:))

cheers:))

3 answers to this question

Recommended Posts

  • 0
  Colin-uk said:
does WHM keep a track of who's paid?

maybe do something with that?

or maybe try intergrating something like modern bill.

As far as I can tell, there's no option in WHM to determine who's paid (and to be honest, I don't fancy modifying WHM :p).

I thought about modernbill etc, but I really wanted to actually do this myself, rather than rely on third party software. I have everything set up, except this feature now, and just changing over to modernbill would mean that i've wasted my time coding the rest of it :p

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.