Colin Posted April 22, 2020 Report Posted April 22, 2020 Hi, new to Blesta. How do I go about replicating the 'Record Payment' process for an invoice via API calls? Quote
0 Paul Posted April 22, 2020 Report Posted April 22, 2020 5 hours ago, Colin said: Hi, new to Blesta. How do I go about replicating the 'Record Payment' process for an invoice via API calls? I would recommend looking at Transactions add() http://source-docs.blesta.com/class-Transactions.html to record a payment via the API. This will not process using a gateway, only create a transaction. Use apply() if you want to apply that transaction to a specific invoice/invoices. Quote
0 Colin Posted April 22, 2020 Author Report Posted April 22, 2020 1 hour ago, Paul said: I would recommend looking at Transactions add() http://source-docs.blesta.com/class-Transactions.html to record a payment via the API. This will not process using a gateway, only create a transaction. Use apply() if you want to apply that transaction to a specific invoice/invoices. Thank you Paul. Couple of follow up questions if you don't mind. 1. I've looked at this process (add > apply) and can't see a way to trigger a receipt (or invoice paid) email for the client once the transaction is added/applied. Is this possible? 2. Also I'm a little lost as to how I format the invoice array ($vars) for the apply transaction? Thanks again. Quote
0 Colin Posted April 25, 2020 Author Report Posted April 25, 2020 Quote I would recommend looking at Transactions add() http://source-docs.blesta.com/class-Transactions.html to record a payment via the API. This will not process using a gateway, only create a transaction. Use apply() if you want to apply that transaction to a specific invoice/invoices. Thank you Paul ?. I didn't read the source properly and was using 'vars[transaction_id]' instead of 'transaction_id'. Still looking for a way to send the client an email after applying a transaction as a receipt, as well as and email once an invoice has been paid in full by an applied transaction. Quote
0 Jono Posted April 27, 2020 Report Posted April 27, 2020 Currently no email template exists for transaction application or invoice closure. There is also no event for transaction application, but you could create a plugin that ties into the Invoices.setClosed event. Quote
Question
Colin
Hi, new to Blesta. How do I go about replicating the 'Record Payment' process for an invoice via API calls?
4 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.