Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter awoodworthcbw

    (@awoodworthcbw)

    Disregard ^ I solved it.

    Thread Starter awoodworthcbw

    (@awoodworthcbw)

    I updated the plugin and now everything seems to be working fine.

    Yoast claims to be ‘soooo good’ at seo but the plugin will sabotage your seo just by not including a bulk removal setting. the script to make it wouldn’t even be that hard to make… is yoast’s wordpress plugin opensource?

    Thread Starter awoodworthcbw

    (@awoodworthcbw)

    This solution still might not be good for our use case here. The problem is that the auth will expire before our lead-times. We are already creating invoices and sending those to the user. The most optimal way (if possible) is If there were a way to create and send a Setup_intent to our CRM so we can make the payment intent/charge at a later time.

    Thanks, Anthony

    Thread Starter awoodworthcbw

    (@awoodworthcbw)

    I’ve also noticed that this filter function you (@mrclayton) provided hasn’t actually been forcing a save:

    add_filter('wc_stripe_force_save_payment_method', 'cbw_force_payment_method', 10, 3);
    function cbw_force_payment_method ($bool, $order, $payment_method): bool
    {
    if(is_checkout()){
    $bool = true;
    }

    return $bool;
    };

    Maybe it’s the priority I’m setting this at ˉ\_(ツ)_/ˉ I’m not sure.

    Thanks!

    awoodworthcbw

    (@awoodworthcbw)

    @michelem68 That’s so strange that the plugin will still update on our site since we don’t have auto update enabled…

    I went to this tab in the plugin’s settings and the drop down for the meta display’s set to none. Do the developers not want us to use this feature? this doesn’t really make sense.

    Thread Starter awoodworthcbw

    (@awoodworthcbw)

    Hi @mrclayton

    I’ve been doing some reflecting and we still need the payment intent to process cards from our CRM because the CRM’s Stripe Plugin/Extension needs that specific record/token from the site on the CRM side to capture. Since we only really just need to be able to capture the funds after the authorization has expired your original solution may be exactly what we need, my bad for the ongoing confusion on my part.

    I guess some of my questions are: Does the code you provided still update that customer record in Stripe with a payment method that we can use later regardless if the user is logged in to our WooCommerce site or not? How could I access this payment method ID? (before I asked I didn’t notice the $payment_method argument my bad) “You can just send the customer’s payment method ID to your CRM and use that to charge the customer.” I think the CRM grabs this from the Customer Record in Stripe anyway and is accessible there or, do I need to add some code to get this value? We don’t really care about our stripe data getting messy just WooCommerce’s and our CRM’s needs to be organized. We definitely just need it to still be able to capture post card pre-auth expiration.

    Thanks for the ongoing support!

    best regards,

    Anthony

    Thread Starter awoodworthcbw

    (@awoodworthcbw)

    Hi @mrclayton

    Thank you for the clarification and the code snippet. I understand your point about keeping it simple and just saving the payment method ID for future charges.

    However, in our specific use case, we need to manage the payment process more dynamically and can’t rely on the user to always have a WooCommerce Account. We have scenarios where we might need to validate the card without an immediate authorization or charge, hence our interest in creating a Setup Intent instead of a Payment Intent to send to our CRM.

    Given that, do you think there’s a straightforward way to integrate the creation of a Setup Intent within the checkout process, potentially replacing or supplementing the existing Payment Intent workflow? We’re trying to ensure the saved payment method aligns seamlessly with our CRM’s processing at a later stage.

    Is there a way for us to create a setup intent just like we’re doing with the payment intent here?

    Thanks again for your ongoing support!

    Best regards,
    Anthony

    Thread Starter awoodworthcbw

    (@awoodworthcbw)

    Hi @mrclayton

    I was thinking about this and In the past I made a change to the plugin (GNU GPL) where we pass the payment_intent id to our CRM software when the payment completes. I was thinking that instead of passing that (PI token) we can somehow create a setup_intent on the transaction based on that $charge object I had changed previously in the plugin code and send it off to our CRM to process at a later time.

    This is where I have updated that code: path: /woo-stripe-payment/includes/abstract/abstract-wc-stripe-payment.php on the payment_complete method in the WC_Stripe_Payment PHP class between lines: 110 – 185 in this method’s $charge parameter. I know we have access to the payment intent but, we think the setup intent will align a lot better with our business needs.

    here’s the change I made previously where I access that Payment Intent


    public function payment_complete($order, $charge)
    {
    /* CUSTOM CHANGE HERE! */
    WC_Stripe_Utils::add_balance_transaction_to_order($charge, $order);
    $this->payment_method->save_order_meta($order, $charge);
    // Retrieve the Payment Intent ID from the charge object
    $payment_intent_id = isset($charge->payment_intent) ? $charge->payment_intent : '';
    //adds the payment_intent id to our meta data for celigo/netsuite
    if($payment_intent_id) {
    $order->update_meta_data('_stripe_pi_id', $payment_intent_id);
    $order->save();

    $order_meta = $order->get_meta('_stripe_pi_id', true);
    //error_log('Payment Intent ID saved to order meta: ' . $order_meta);
    }
    /*REST of payment_complete method CODE */
    }

    I was wondering do we have access to create this Setup Intent record instead of the Payment Intent record?

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)