Page 46 of 58 FirstFirst ... 36444546474856 ... LastLast
Results 451 to 460 of 574
  1. #451
    Join Date
    May 2010
    Location
    Texas
    Posts
    491
    Plugin Contributions
    0

    Default Re: Stripe payment module -Duplicate orders

    I do see several successful transactions followed within 0 minutes with an "incomplete" transaction from the same customer. The 1st transaction is successful on Stripe dashboard, the 2nd is "incomplete". It is the 2nd incomplete transaction that is captured within Zen

  2. #452
    Join Date
    Jul 2021
    Location
    Fukuoka Japan
    Posts
    125
    Plugin Contributions
    2

    Default Re: Stripe payment module -Duplicate orders

    i want to see your checkout.js.

  3. #453
    Join Date
    Jul 2021
    Location
    Fukuoka Japan
    Posts
    125
    Plugin Contributions
    2

    Default Re: Stripe payment module -Duplicate orders

    i checked 218module. I found an incorrect code.

  4. #454
    Join Date
    May 2010
    Location
    Texas
    Posts
    491
    Plugin Contributions
    0

    Default Re: Stripe payment module -Duplicate orders

    Quote Originally Posted by Gozzandes View Post
    i want to see your checkout.js.
    from /includes/checkout.js


    Code:
    const stripe = Stripe (PublishableKey);
    
    let elements;
    
    initialize();
    checkStatus();
    
    document
      .querySelector("#payment-form")
      .addEventListener("submit", handleSubmit);
    
    // Fetches a payment intent and captures the client secret
    async function initialize(){
      const { clientSecret } = await clientS; 
      //   const { clientSecret } =await fetch("/create.php", {
      //   method: "POST",
      //   headers: { "Content-Type": "application/json" },
      //   body: JSON.stringify({ items }),
      // }).then((r) => r.json());
    
      
      elements = stripe.elements({ clientSecret });
    
      const paymentElementOptions = {
        layout: "tabs",
      };
    
      const paymentElement = elements.create("payment", paymentElementOptions);
      paymentElement.mount("#payment-element");
    }
    
    async function handleSubmit(e) {
      e.preventDefault();
      setLoading(true);
    
      const response = await stripe.confirmPayment({
        elements,
        confirmParams: {
          return_url: confirmationURL,
         },
        redirect: 'if_required'
       }
      )
      
       if (response.error) {
        showMessage(response.error.message);
       } else {
        document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
        showMessage(PaymentSuccess);
        document.getElementById("btn_submit").click();
    }
      setLoading(false);
    }
    
    // Fetches the payment intent status after payment submission
    async function checkStatus() {
      const clientSecret = new URLSearchParams(window.location.search).get(
        "payment_intent_client_secret"
      );
    
      if (!clientSecret) {
        return;
      }
    
      const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
    
      switch (paymentIntent.status) {
        case "succeeded":
          document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
          showMessage(PaymentSuccess);
          document.getElementById("btn_submit").click();
          break;
        case "processing":
          document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
          showMessage("Your payment is processing.");
          break;
        case "requires_payment_method":
          document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
          showMessage("Your payment was not successful, please try again.");
          break;
        default:
          document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
          showMessage("Something went wrong.");
          break;
      }
    }
    
    // ------- UI helpers -------
    
    function showMessage(messageText) {
      const messageContainer = document.querySelector("#payment-message");
    
      messageContainer.classList.remove("hidden");
      messageContainer.textContent = messageText;
    
      setTimeout(function () {
        messageContainer.classList.add("hidden");
        messageText.textContent = "";
      }, 4000);
    }
    
    // Show a spinner on payment submission
    function setLoading(isLoading) {
      if (isLoading) {
        // Disable the button and show a spinner
        document.querySelector("#submit").disabled = true;
        document.querySelector("#spinner").classList.remove("hidden");
        document.querySelector("#button-text").classList.add("hidden");
      } else {
        document.querySelector("#submit").disabled = false;
        document.querySelector("#spinner").classList.add("hidden");
        document.querySelector("#button-text").classList.remove("hidden");
      }
    }

  5. #455
    Join Date
    Jul 2021
    Location
    Fukuoka Japan
    Posts
    125
    Plugin Contributions
    2

    Default Re: Stripe payment module -Duplicate orders

    Quote Originally Posted by split63 View Post
    from /includes/checkout.js


    Code:
    const stripe = Stripe (PublishableKey);
    
    let elements;
    
    initialize();
    checkStatus();
    
    document
      .querySelector("#payment-form")
      .addEventListener("submit", handleSubmit);
    
    // Fetches a payment intent and captures the client secret
    async function initialize(){
      const { clientSecret } = await clientS; 
      //   const { clientSecret } =await fetch("/create.php", {
      //   method: "POST",
      //   headers: { "Content-Type": "application/json" },
      //   body: JSON.stringify({ items }),
      // }).then((r) => r.json());
    
      
      elements = stripe.elements({ clientSecret });
    
      const paymentElementOptions = {
        layout: "tabs",
      };
    
      const paymentElement = elements.create("payment", paymentElementOptions);
      paymentElement.mount("#payment-element");
    }
    
    async function handleSubmit(e) {
      e.preventDefault();
      setLoading(true);
    
      const response = await stripe.confirmPayment({
        elements,
        confirmParams: {
          return_url: confirmationURL,
         },
        redirect: 'if_required'
       }
      )
      
       if (response.error) {
        showMessage(response.error.message);
       } else {
        document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
        showMessage(PaymentSuccess);
        document.getElementById("btn_submit").click();
    }
      setLoading(false);
    }
    
    // Fetches the payment intent status after payment submission
    async function checkStatus() {
      const clientSecret = new URLSearchParams(window.location.search).get(
        "payment_intent_client_secret"
      );
    
      if (!clientSecret) {
        return;
      }
    
      const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
    
      switch (paymentIntent.status) {
        case "succeeded":
          document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
          showMessage(PaymentSuccess);
          document.getElementById("btn_submit").click();
          break;
        case "processing":
          document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
          showMessage("Your payment is processing.");
          break;
        case "requires_payment_method":
          document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
          showMessage("Your payment was not successful, please try again.");
          break;
        default:
          document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
          showMessage("Something went wrong.");
          break;
      }
    }
    
    // ------- UI helpers -------
    
    function showMessage(messageText) {
      const messageContainer = document.querySelector("#payment-message");
    
      messageContainer.classList.remove("hidden");
      messageContainer.textContent = messageText;
    
      setTimeout(function () {
        messageContainer.classList.add("hidden");
        messageText.textContent = "";
      }, 4000);
    }
    
    // Show a spinner on payment submission
    function setLoading(isLoading) {
      if (isLoading) {
        // Disable the button and show a spinner
        document.querySelector("#submit").disabled = true;
        document.querySelector("#spinner").classList.remove("hidden");
        document.querySelector("#button-text").classList.add("hidden");
      } else {
        document.querySelector("#submit").disabled = false;
        document.querySelector("#spinner").classList.add("hidden");
        document.querySelector("#button-text").classList.remove("hidden");
      }
    }
    Can you erase line 39?
    Code:
    return_url: confirmationURL,
    Nihon yokane corporation

  6. #456
    Join Date
    May 2010
    Location
    Texas
    Posts
    491
    Plugin Contributions
    0

    Default Re: Stripe payment module -Duplicate orders

    Quote Originally Posted by Gozzandes View Post
    Can you erase line 39?
    Code:
    return_url: confirmationURL,
    Nihon yokane corporation
    This is a live site.....is this safe?

    PHP Code:
          confirmParams: {
        
    //  return_url: confirmationURL,
         
    }, 

  7. #457
    Join Date
    Jul 2021
    Location
    Fukuoka Japan
    Posts
    125
    Plugin Contributions
    2

    Default Re: Stripe payment module -Duplicate orders

    Quote Originally Posted by split63 View Post
    This is a live site.....is this safe?

    PHP Code:
          confirmParams: {
        
    //  return_url: confirmationURL,
         
    }, 
    I've check it using xampp.
    it works without any problem.

  8. #458
    Join Date
    May 2010
    Location
    Texas
    Posts
    491
    Plugin Contributions
    0

    Default Re: Stripe payment module -Duplicate orders

    Ok, I commented out line 39. In test mode I ran a few credit card transactions. They all went fine. Zen captured the orders and Strip dashboard showed successful.
    After I click "Confirm Order" on the 3rd checkout page, I also then repeatedly clicked "Confirm Order", as I know my impatient customers do, it did not seem to create any problems

  9. #459
    Join Date
    Jun 2024
    Posts
    91
    Plugin Contributions
    0

    Default Re: Stripe payment module -Duplicate orders

    Hello, I have Zen Cart 2.1.0 installed and am trying to get the Stripe Payments Module up and running. I have it installed and connected to my Stripe account. Have it in "Test Mode" but keep gettting hung up going to step 3 of checkout.
    I get a blank page with a "WARNING: an error has occured" message.
    I have my test keys correctly applied to the module settings... not sure what is making this hang.
    This is what the DeBug Log File says... not sure what it's trying to tell me... any input on where to look is appreciated, thanks

    [30-Dec-2024 00:11:49 UTC] Request URI: /index.php?main_page=checkout_confirmation, IP address: 35.140.xx.x, Language id 1
    #1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:733]
    #2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:678]
    #3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:307]
    #4 queryFactory->Execute() called at [/includes/modules/payment/stripe.php:165]
    #5 stripe->pre_confirmation_check() called at [/includes/classes/payment.php:309]
    #6 payment->pre_confirmation_check() called at [/includes/modules/pages/checkout_confirmation/header_php.php:92]
    #7 require(/includes/modules/pages/checkout_confirmation/header_php.php) called at [/index.php:35]
    --> PHP Fatal error: MySQL error 1146: Table 'xxxx670_zenc936.zenen_stripe' doesn't exist :: SELECT stripe_customers_id FROM zenen_stripe WHERE customers_id = '2' order by id DESC LIMIT 1 ==> (as called by) /includes/modules/payment/stripe.php on line 165 <== in /includes/classes/db/mysql/query_factory.php on line 733.

  10. #460
    Join Date
    Jul 2021
    Location
    Fukuoka Japan
    Posts
    125
    Plugin Contributions
    2

    Default Re: Stripe payment module -Duplicate orders

    Quote Originally Posted by BigB View Post
    Hello, I have Zen Cart 2.1.0 installed and am trying to get the Stripe Payments Module up and running. I have it installed and connected to my Stripe account. Have it in "Test Mode" but keep gettting hung up going to step 3 of checkout.
    I get a blank page with a "WARNING: an error has occured" message.
    I have my test keys correctly applied to the module settings... not sure what is making this hang.
    This is what the DeBug Log File says... not sure what it's trying to tell me... any input on where to look is appreciated, thanks

    [30-Dec-2024 00:11:49 UTC] Request URI: /index.php?main_page=checkout_confirmation, IP address: 35.140.xx.x, Language id 1
    #1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:733]
    #2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:678]
    #3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:307]
    #4 queryFactory->Execute() called at [/includes/modules/payment/stripe.php:165]
    #5 stripe->pre_confirmation_check() called at [/includes/classes/payment.php:309]
    #6 payment->pre_confirmation_check() called at [/includes/modules/pages/checkout_confirmation/header_php.php:92]
    #7 require(/includes/modules/pages/checkout_confirmation/header_php.php) called at [/index.php:35]
    --> PHP Fatal error: MySQL error 1146: Table 'xxxx670_zenc936.zenen_stripe' doesn't exist :: SELECT stripe_customers_id FROM zenen_stripe WHERE customers_id = '2' order by id DESC LIMIT 1 ==> (as called by) /includes/modules/payment/stripe.php on line 165 <== in /includes/classes/db/mysql/query_factory.php on line 733.
    Upload following sql code from the admin page.

    [CODE]
    TRUNCATE `zenen_stripe `;
    [/CODE]

 

 
Page 46 of 58 FirstFirst ... 36444546474856 ... LastLast

Similar Threads

  1. pay2check.com payment module?
    By sunrise99 in forum Addon Payment Modules
    Replies: 0
    Last Post: 1 Nov 2011, 03:55 AM
  2. klikandpay.com payment module
    By rulest in forum Addon Payment Modules
    Replies: 0
    Last Post: 24 Sep 2010, 06:06 PM
  3. AlertPay Payment Module Integration Help Please!
    By etorf9751 in forum Addon Payment Modules
    Replies: 8
    Last Post: 16 Aug 2010, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR