You are here

function hook_commerce_coupon_final_checkout_transaction_rollback in Commerce Coupon 7.2

Transaction related modules must implement a rollback hook to clean up transactions in the event that payment validation fails after the transaction has been processed.

This hook fires when the review page rebuilds after a coupon-transaction module has done transactions. This is not the perfect setup because it can confuse off-site payment methods, but short of a split-payment API in Commerce, it is about as good as we can get.

Parameters

int $transaction_id:

See also

commerce_coupon_usage_commerce_coupon_final_checkout_transaction_rollback().

hook_commerce_coupon_final_checkout_validate().

1 function implements hook_commerce_coupon_final_checkout_transaction_rollback()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

commerce_coupon_usage_commerce_coupon_final_checkout_transaction_rollback in modules/usage/commerce_coupon_usage.module
Implements hook_commerce_coupon_final_checkout_transaction_rollback().
1 invocation of hook_commerce_coupon_final_checkout_transaction_rollback()
commerce_coupon_rollback_order_transactions in ./commerce_coupon.module
Rollback coupon-related transactions found within an order.

File

./commerce_coupon.api.php, line 71

Code

function hook_commerce_coupon_final_checkout_transaction_rollback($transaction_id) {
  mymodule_void_transaction($transaction_id);
}