save_complete_transaction - saves the complete transaction
save_complete_transaction is an important function in Midrub Payments, which marks as complete a transaction. This function should be present in your payments gateway.
How the function save_complete_transaction works?
- First a theme's, app's or component's page will use the function generate_incomplete_transaction to generate an incomplete transaction.
- In your payment gateway you have to use the function the_incomplete_transaction to register the incomplete transaction and to get the transaction with transaction's id.
- And finally the save_complete_transaction function will use the transaction's id to mark it as complete.
The save_complete_transaction has these parameters:
- $transaction_id - has the transaction's ID returned by the function the_incomplete_transaction.
- $user_id - contains the current user's ID.
- $args has 3 keys: net_id(if transaction is success, contains the transaction's ID provided by Gateway), gateway(could be slug or name of your gateway) and status(should be 1 or 2).
- How works the plans subscriptions in Midrub
- How to create new placeholders for an invoice's template
- Please don't ask me to add new payments gateways
- delete_subscription - delete payments subscriptions
- How works the fields and options in the Midrub Payments system
- the_complete_transaction - provides a completed transaction
- save_complete_transaction - saves the complete transaction
- the_incomplete_transaction - get the transaction's information
- How to custom or change the payments gateway's icon
- set_gateway - register your payments gateway in the list