• Resolved iamdev

    (@iamdev)


    With reference to the below topic:https://www.ads-software.com/support/topic/2-stripe-account-on-one-woocommerce-plugin/

    But that didn’t work out, issue is that klarna support for US stripe account and won’t work for others, so I have two stripe account one from US and another from other country which doesn’t support Klarna, so if users selects klarna then stripe account should change to the US one which supports it and for other it should return to the default.

    I have gone through dev documentation and other but couldn’t find a suitable result.

    I also noticed you will only show klarna or local payment method if that stripe account support it so could you help me with the work around for above requirement as I am losing sales.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter iamdev

    (@iamdev)

    I tried this code after going through your code but it doesn’t seems to work

        // Namespaces for Stripe Payments Plugin
    use PaymentPlugins\WC_Payment_Gateway_Stripe_Connect as StripeConnect;
    use PaymentPlugins\WC_Payment_Gateway_Stripe_API as StripeAPI;
    
    // The action hook 'woocommerce_payment_gateways'
    add_action('woocommerce_payment_gateways', 'override_stripe_api_keys_for_credit_card_gateway');
    function override_stripe_api_keys_for_credit_card_gateway($gateways)
    {
        // Checks to see if the "Credit Card" gateway is being initialized.
        if (isset($gateways['stripe_cc'])) {
    
            // Replace 'your_stripe_user_id_for_cc' with the ID of the Stripe account you want to use for the credit card payment.
            $custom_settings = get_option('stripe_account_your_stripe_user_id_for_cc_options');
    
            $gateway_settings = array(
                'account_id' => $custom_settings['account_id'],
                'secret_key_live' => $custom_settings['secret_key_live'],
                'publishable_key_live' => $custom_settings['publishable_key_live'],
            );
    
            // Set Stripe API keys
            StripeAPI::set_secret_key($gateway_settings['secret_key_live']);
            StripeAPI::set_publishable_key($gateway_settings['publishable_key_live']);
            StripeConnect::set_account_id($gateway_settings['account_id']);
        }
    
        return $gateways;
    }
    }

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @iamdev

    I don’t recommend you try to manage 2 separate Stripe accounts as there are many pitfalls and potential issues. Each Stripe account has its own set of saved customer ID’s and payment methods which you will also need to manage so the customer sees their saved payment methods on the checkout page.

    Also, you would need to pass the correct customer ID to Stripe based on the account ID that’s being used which means you need to store 2 separate Stripe customer ID’s in your database.

    Kind Regards

    Thread Starter iamdev

    (@iamdev)

    Thank you for the insight but required as my store sells expensive items and user need it in the installment.

    So can you guide me to change the payment intent thing and whenever the user changed the payment method used, as i am changing it whenever the payment method is changed not particular for individually for every product

    Plugin Author Payment Plugins

    (@mrclayton)

    Thank you for the insight but required as my store sells expensive items and user need it in the installment.

    My recommendation would be to request access to Klarna through your existing Stripe account if that’s possible.

    So can you guide me to change the payment intent thing and whenever the user changed the payment method used

    The complexity of managing two separate accounts is beyond the scope of these support forums. I believe the best route is to see if Klarna can be added to your existing Stripe account by contacting Stripe customer support.

    Kind Regards

    Thread Starter iamdev

    (@iamdev)

    As I cannot use klarna with my stripe account reason being not supported due to another currency and also your plugin will not show that is why i am here, however can you direct me to the direction to change the payment intent if the key is changed

    Thread Starter iamdev

    (@iamdev)

    Hey, by the way I am getting this error on Klarna

    There has been an error with your address

    Please check the following fields: City, Given name, Postal code, Family name

    Thread Starter iamdev

    (@iamdev)

    Hi,

    It seems like this is not working with a plugin called fluid checkout given name and family name error

    There has been an error with your address

    Please check the following fields: Given name, Family name

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @iamdev

    It seems like this is not working with a plugin called fluid checkout given name and family name error

    Is this error occuring on the Klarna hosted payment page or on your WooCommerce checkout page? The Stripe plugin takes the billing first and last name values from the order and passes them to Stripe.

    Make sure your entries are valid.

    Kind Regards

    Thread Starter iamdev

    (@iamdev)

    Yeah, entries are valid so if i deactivate the fluid checkout plugin it works and takes me to the Klarna hosted page for payment otherwise show error on the Klarna hosted page of the given name and family name error

    Thread Starter iamdev

    (@iamdev)

    Any update on it?

    Plugin Author Payment Plugins

    (@mrclayton)

    so if i deactivate the fluid checkout plugin it works and takes me to the Klarna hosted page for payment otherwise show error on the Klarna hosted page of the given name and family name error

    Did you reach out to the Fluid Checkout developers and ask them if they manipulate the billing first or last name fields? If it’s working when you deactivate Fluid Checkout then that’s a good indication they are doing something with those fields.

    Is that a premium plugin?

    Kind Regards

    Thread Starter iamdev

    (@iamdev)

    Can you direct me to the direction to change the payment intent if the key is changed, do you have a filter which which we can attach to create a new paymentintent based on certain condition

    Thread Starter iamdev

    (@iamdev)

    Leave the payment intent, Is there a way I can update the payment method based on certain condition so that if user make the payment for the first time then it works well but if the same user makes the payment later on and change his address then it should update the payment method.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘2 stripe account on for klarna and one for other’ is closed to new replies.