diff --git a/payment/uc_authorizenet/uc_authorizenet.module b/payment/uc_authorizenet/uc_authorizenet.module index 0a37195..d2bf0b7 100644 --- a/payment/uc_authorizenet/uc_authorizenet.module +++ b/payment/uc_authorizenet/uc_authorizenet.module @@ -353,6 +353,7 @@ function _uc_authorizenet_cim_profile_charge($order, $amount, $data) { 'success' => FALSE, ); $comment[] = '('. $response['resultCode'] .': '. $response['text'] .')'; + uc_order_comment_save($order->order_id, $user->uid, implode('
', $comment), 'admin'); } // Transaction succeeded. @@ -398,7 +399,7 @@ function _uc_authorizenet_cim_profile_charge_request($order, $amount, $data) { 'amount' => _uc_authorizenet_format_amount($amount), 'customerProfileId' => $profile['customerProfileId'], 'customerPaymentProfileId' => $profile['customerPaymentProfileId'], - 'customerShippingAddressId' => $profile['customerAddressId'], + 'customerShippingAddressId' => (!empty($profile['customerAddressId'])) ? $profile['customerAddressId'] : '0', 'order' => array( 'invoiceNumber' => $order->order_id, ),