ty0716 Posted September 15, 2015 Report Posted September 15, 2015 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? Quote
0 Tyson Posted September 15, 2015 Report Posted September 15, 2015 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. Michael 1 Quote
0 Cody Posted September 17, 2015 Report Posted September 17, 2015 You can look at two different events (you'll need to create a plugin that can listen for these events). One of the following: Transactions.add 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 Quote
Question
ty0716
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.