function edit_status($order = false) { extract($order); if ($purchlog_data['gateway'] == 'wpec_auth_net') { $auth_net = new wpec_auth_net($purchlog_id); if (!$auth_net->beenCaptured($purchlog_id)) { if ($auth_net->capturePreAuth($order)) { return true; } else { //Kill THis processes so this order status can't get updated die(__('Failed to capture payment', 'wpsc_gold_cart')); } } } }
function wpec_auth_net_user_profile_display() { $myGateway = new wpec_auth_net(); $creditcards = $myGateway->getCreditCardProfiles(); $bankaccounts = $myGateway->getBankAccountProfiles(); $shipaddress = $myGateway->getShippingProfiles(); $auth_net_message = wpsc_get_customer_meta('auth_net_message'); ?> <div id='wpec_auth_net_user_profile_manager'> <h2><?php _e('Saved Credit Card, Bank and Shipping Information', 'wpsc_gold_cart'); ?> </h2> <?php if (isGood($auth_net_message)) { ?> <div class='notice'><?php echo $auth_net_message; ?> </div> <?php wpsc_delete_customer_meta('auth_net_message'); } if ($bankaccounts) { ?> <form action="<?php echo $wpec_auth_net_user_profile_url; ?> " method="post"> <div id='bankaccounts'class='sectionBox'> <span class="sectionHeader"><?php _e("Bank Accounts You've Saved For Easy Checkout.", 'wpsc_gold_cart'); ?> </span> <div class="displayList"><?php echo $bankaccounts; ?> </div> <input type='hidden' name='type' value='bankaccounts'> <input type='submit' name='submit' class='btn' value='Delete'> </div> </form> <?php } ?> <?php if ($creditcards) { ?> <form action="<?php echo $wpec_auth_net_user_profile_url; ?> " method="post"> <div id='creditcards'class='sectionBox'> <span class="sectionHeader"><?php _e("Credit Cards You've Saved For Easy Checkout.", 'wpsc_gold_cart'); ?> </span> <div class="displayList"><?php echo $creditcards; ?> </div> <input type='hidden' name='type' value='creditcards'> <input type='submit' name='submit' class='btn' value='Delete'> </div> </form> <?php } ?> <?php if ($shipaddress) { ?> <form action="<?php echo $wpec_auth_net_user_profile_url; ?> " method="post"> <div id='shipaddress'class='sectionBox'> <span class="sectionHeader"><?php _e("Shipping Addresses You've Saved For Easy Checkout.", 'wpsc_gold_cart'); ?> </span> <div class="displayList"><?php echo $shipaddress; ?> </div> <input type='hidden' name='type' value='shippingaddress'> <input type='submit' class='btn' name='submit' value='Delete'> </div> </form> <?php } ?> </div> <?php }