Hi.
Is there any way to use the authorization of a previously authenticated card as either a trigger or a condition within Conditional Actions?
If not, how would I go about using custom PHP in a condition to check if the payment has been taken?
I see in the order comments that "TxAuthNo" and a couple of other fields are filled in - how do I get at that with PHP?

Cheers

Comments

griz’s picture

Alternatively, would it be possible to alter the module so that the payment is entered when the transaction is authorized rather than authenticated?

griz’s picture

Ok, so I've come up with a really ugly hack - move line 714:

<?php
function uc_protx_vsp_direct_3DSecure_callback() {
...
  if ($result['success'] == TRUE) {
  //  uc_payment_enter($order->order_id, 'credit', $order->order_total, $order->uid, '', $result['comment']);
    $_SESSION['do_complete'] = TRUE;
    $redirect = 'cart/checkout/complete';
  }
...
}
?>

to line 1025:

<?php
function uc_protx_vsp_direct_auth_form_submit($form, &$form_state) {
...
  if ( $result['success'] ) {
    uc_payment_enter($order->order_id, 'credit', $order->order_total, $order->uid, '', $result['comment']);
    drupal_set_message(t('The transaction was succesfully authorised by the acquiring bank.'));
    uc_order_comment_save($order_id, $user->uid, $result['comment']);
 }
...
}
?>

Which only works if 3D-Secure is enabled, as the Ubercart CC module has its own call to uc_payment_enter().
This could be solved if the option to authorize and then capture were enabled in the payment gateway config page. But it's not. Any idea where I might start in order to get that enabled?
"Authorize / Capture" seems to be essentially the same as "Authenticate / Authorize".

griz’s picture

Status: Active » Fixed

Well... It would have made sense to at least tried the dev version before hacking away wouldn't it? I even made my own "capture custom amount" field. How silly of me.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.