Jump to content

Updating the Invoices & WHMCS after IPN


leon_nerd

Recommended Posts

Hi Guys,

 

I am using PayPal and just setted up the recurring payment for PayPal. Now, I have queries with the IPN message. I am not sure how will I update the new generated invoices automatically as soon as I receive the IPN message from PayPal confirming me the payment.

 

What I am thinking is:

 

1.) Get the IPN. It will contain the Profile_id.

2.) Use the Profile_id to fetch the first invoice number (stored in the paypal recurring profile).

3.) Search the WHMCS DB for this Invoice number and get the corresponding which will help me update the latest generated invoice for this order.

 

Now the problem with step 3 is I am not sure what values I should be using to match and update the newly generated invoice? What I have if the FIRST invoice number. How can I search around and find the latest Invoice for this order and update it?

 

I checked the tables tblhosting. tbldomain, tblinvoices, tblinvoiceitems. What tables I should be using? What fields should I be updating? Are there any tables in which I need to add any new record?

 

Please help me as this is very urgent.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated