function _commerce_stripe_commerce_payment_transaction_save in Commerce Stripe 7
Same name and namespace in other branches
- 7.3 commerce_stripe.module \_commerce_stripe_commerce_payment_transaction_save()
attempt to save the transaction and set messages if unsuccessful
2 calls to _commerce_stripe_commerce_payment_transaction_save()
- commerce_stripe_cardonfile_charge in ./
commerce_stripe.module - Card on file callback: background charge payment TODO: implement proper return codes per commerce payment
- commerce_stripe_submit_form_submit in ./
commerce_stripe.module - Payment method callback: checkout form submission.
File
- ./
commerce_stripe.module, line 601 - This module provides Stripe (http://stripe.com/) payment gateway integration to Commerce. Commerce Stripe offers a PCI-compliant way to process payments straight from you Commerce shop.
Code
function _commerce_stripe_commerce_payment_transaction_save($transaction) {
if (!commerce_payment_transaction_save($transaction)) {
drupal_set_message(t('Our site is currently unable to process your card. Please contact the site administrator to complete your transaction'), 'error');
watchdog('commerce_stripe', 'commerce_payment_transaction_save returned false in saving a stripe transaction for order_id @order_id.', array(
'@order_id' => $transaction->order_id,
), WATCHDOG_ERROR);
return FALSE;
}
else {
return TRUE;
}
}