diff --git a/uc_stripe.module b/uc_stripe.module
index e1a9310..de16887 100644
--- a/uc_stripe.module
+++ b/uc_stripe.module
@@ -519,16 +519,12 @@ function uc_stripe_checkout_form_customsubmit($form, &$form_state) {
 /**
  * Generic "charge" callback that runs on checkout and via the order's "card" terminal
  *
- * @param $order_id
- * @param $amount
- * @param $data
  * @return array
  */
 function uc_stripe_charge($order_id, $amount, $data) {
   global $user;
 
-  //  Load the stripe PHP API
-
+  //  Loads the stripe PHP API
   if (!_uc_stripe_prepare_api()) {
     $result = array(
       'success' => FALSE,
@@ -542,18 +538,6 @@ function uc_stripe_charge($order_id, $amount, $data) {
 
   $order = uc_order_load($order_id);
 
-  $context = array(
-    'revision' => 'formatted-original',
-    'type' => 'amount',
-  );
-
-  $options = array(
-    'sign' => FALSE,
-    'thou' => FALSE,
-    'dec' => FALSE,
-    'prec' => 2,
-  );
-
   // Format the amount in cents, which is what Stripe wants
   $amount = uc_currency_format($amount, FALSE, FALSE, FALSE);
 
@@ -574,67 +558,35 @@ function uc_stripe_charge($order_id, $amount, $data) {
     return $result;
   }
 
-  $stripe_customer_id = null;
-
-  if(key_exists('stripe_customer_id', $order->data)){
-    $stripe_customer_id = $order->data['stripe_customer_id'];
-  }
-
   // Rexamine Payment Intent and Record payment or failure to the customer
   try {
 
-    if(!key_exists('payment_intent_id', $order->data)){
+    if (empty($order->data['payment_intent_id'])) {
       throw new Exception('The payment Intent has failed.');
     }
-
-    //Bail if there's no customer ID
-    if (empty($stripe_customer_id) || is_null($stripe_customer_id)) {
-      throw new Exception('No customer ID found');
-    }
-
-    //Bail if there's no payment method
-    if (empty($_SESSION['stripe']['payment_method'])) {
-      throw new Exception('Token not found');
-    }
-    $stripe_payment_method_id = $_SESSION['stripe']['payment_method'];
-
-    $params = array(
-      "amount" => $amount,
-      "currency" => strtolower($order->currency),
-      "customer" => $stripe_customer_id,
-      "description" => t("Order #@order_id", array("@order_id" => $order_id)),
-      "payment_method" => $stripe_payment_method_id,
-      "payment_method_types" => ['card'],
-      "confirm" => true,
-
-    );
-
     $intent_id = $order->data['payment_intent_id'];
 
-    if (!empty($shipping_info)) {
-      $params['shipping'] = $shipping_info;
-      \Stripe\PaymentIntent::update($intent_id, ['shipping' => $shipping_info]);
-    }
-
     // charge the Customer the amount in the order
     $payment_intent = \Stripe\PaymentIntent::retrieve($intent_id);
 
     if ($payment_intent->status != 'succeeded') {
+      drupal_set_message(
+        $payment_intent['last_payment_error']['message'],
+        'warning'
+      );
       throw new Exception($payment_intent['last_payment_error']['message']);
     }
 
+    // @TODO add condition exist "charges->data[0]['id']"
     $charge_id = $payment_intent->charges->data[0]['id'];
-
-    $formatted_amount = $amount / 100;
-    $formatted_amount = number_format($formatted_amount, 2);
-
-//     $payment_method = \Stripe\PaymentMethod::retrieve($payment_intent->payment_method);
-//     $payment_method->attach(['customer' => $stripe_customer_id]);
+    $formatted_amount = number_format($amount / 100, 2);
 
     $result = array(
       'success' => TRUE,
-      'message' => t('Payment of @amount processed successfully, Stripe transaction id @transaction_id.', array('@amount' => $formatted_amount, '@transaction_id' => $charge_id)),
-      'comment' => t('Stripe transaction ID: @transaction_id', array('@transaction_id' => $charge_id)),
+      'message' => t('Payment of @amount processed successfully, Stripe transaction id @transaction_id.',
+        array('@amount' => $formatted_amount, '@transaction_id' => $charge_id)),
+      'comment' => t('Stripe transaction ID: @transaction_id',
+        array('@transaction_id' => $charge_id)),
       'uid' => $user->uid,
     );
 
@@ -642,43 +594,32 @@ function uc_stripe_charge($order_id, $amount, $data) {
     uc_order_comment_save($order_id, $user->uid, $result['message'], 'order', 'completed', FALSE);
 
     return $result;
-
-  } catch (Exception $e) {
+  }
+  catch (Exception $e) {
     $result = array(
       'success' => FALSE,
       'comment' => $e->getCode(),
-      'message' => t("Stripe Charge Failed for order !order: !message", array(
-        "!order" => $order_id,
-        "!message" => $e->getMessage()
-      )),
+      'message' => t('Stripe Charge Failed for order @order: @message',
+        array(
+          '@order' => $order_id,
+          '@message' => $e->getMessage()
+        )
+      ),
       'uid' => $user->uid,
       'order_id' => $order_id,
     );
     uc_order_comment_save($order_id, $user->uid, $result['message'], 'admin');
-    watchdog('uc_stripe', 'Stripe charge failed for order @order, message: @message', array('@order' => $order_id, '@message' => $result['message']));
+    watchdog(
+      'uc_stripe',
+      'Stripe charge failed for order @order, message: @message',
+      array('@order' => $order_id, '@message' => $result['message']),
+      WATCHDOG_ERROR
+    );
 
     $_SESSION['stripe']['payment_failed'] = TRUE;
 
     return $result;
   }
-
-  //  Default / Fallback procedure to fail if the above conditions aren't met
-
-  $result = array(
-    'success' => FALSE,
-    'comment' => "Stripe Gateway Error",
-    'message' => "Stripe Gateway Error",
-    'uid' => $user->uid,
-    'order_id' => $order_id,
-  );
-
-  uc_order_comment_save($order_id, $user->uid, $result['message'], 'admin');
-
-  watchdog('uc_stripe', 'Stripe gateway error for order @order_id', array('order_id' => $order_id));
-
-  $_SESSION['stripe']['payment_failed'] = TRUE;
-
-  return $result;
 }
 
 /**
