Jump to content
  • 0

How To Build A Post Request When Invoices Paid And Pay For A Service


Question

Posted

Hi,

 

I want to achieve this function.

 

When invoice payment is successful, and is pay for a service. Then post a json data to my other php url, like this {"client_id":1,"invoice_id":9,time:"2015-09-15 10:14:33",amount:"","service_id":13}

 

How can this be achieved?

2 answers to this question

Recommended Posts

  • 0
Posted

You can look at two different events (you'll need to create a plugin that can listen for these events).

 

One of the following:

  1. Transactions.add
  2. Invoices.setClosed

 

The first is triggered when a transaction is added. The second is triggered when an invoice is closed, which happens when it's paid. Sounds like you'd want to go with #2

  • 0
Posted

Sounds like you may need to tie into the GatewayPayments component where a payment is deemed successful, determine whether any invoices were directly paid, then determine the services on those invoices, then make a post request to your URL.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...