Posted: July 14, 2016 at 8:34 am
|
I am coding a simple custom plugin that updates all current transactions from status “not completed” to “completed”. I would like to know if I can just update the transaction status or do I have to update the complete model relations, e.g. line_item(s).
|
|
I think I found the right key fields. The following code should do the trick (change status to complete and set paid amount to the total amount to be paid) with all transactions that are status incomplete.
I just would like to have a comfirmation that this snipped is ok before I totally ruin my database EE relations. 😀 |
Hi there, Can I ask why you want to update the transaction status and the paid amount for all incomplete transactions? |
|
|
The reason is simple. With every booking/registration the customer accepts that the amount will be withdrawn from his bank account via the payment method “SEPA Direct Debit”. Since you do not offer some sort of direct debit from a bank account as a payment method, I modified the bank payment method to fit my needs. All registrations are approved by default. The transaction status, however, keeps beeing incomplete although the money is getting debited from the customers account. Since the payment is almost garantueed and it is going to be a lot of registrations we do not want to handle every registration manually and add the payment and complete the transaction. That is why I would like to complete all transactions on a daily basis and set the paid amount to the due amount, because that is the amount that is going to be withdrawn from the customer’s bank account. If there is a more convenient and maybe more safe way to do this, please let me know. |
Hello, Have you taken a look at Mollie payment gateway? It supports SEPA direct debit: https://www.mollie.com/en/directdebit Sofort banking sounds like it may be a similar service: https://www.mollie.com/en/sofort — |
|
|
Hi Lorenzo, Mollie is no option since it takes a percentage fee from each transaction. Sofort banking is totally different and no solution as well. As I said, each registrant needs to have and account with the registrants banking data provided. With signing up the registrant/student accepts the terms & conditions that with each registration the amount due will be withdrawn from his bankaccount. This withdrawing process is totally not happening on the wordpress end. Ultimately, no transaction at all is going to happend through EE. It is just used for course handling. |
Hi there, As far as I can tell, the update() method you’re using in your custom code isn’t used anywhere in Event Espresso core. It might be okay to use, but since it’s not used by Event Espresso core it’s advised that you test your code before going live. |
|
The support post ‘Update Transaction (code)’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.