• Hello, thanks for the plugin. Having the same problem as many others. Using the following shortcode :

    [accept_stripe_payment name=”Donation” button_text=”Pay with Credit Card” description=”Thank you” item_logo=”/resource/img/logoThumb.jpg”]

    On clicking “Pay with Credit Card button”, always receive a “logoUrl() failed to load” javascript error message alert.

    Once payment details have been submitted the checkout result page always shows “Invalid item price” error and never takes payment.

    Have tried many times with the same results.

    Any suggestions or ideas?

    Thank you ??

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi, please see the shortcode sample below. You will notice the item_logo=”” is different to yours. You need to fix and add the full path to your logo. You will also see the price=”” parameter. You need to add a price parameter to your shortcode above.


    [accept_stripe_payment name=”Test Product” price=”39.00″ button_text=”Buy Now” item_logo=”https://example.com/my-item-logo.png”%5D

    Let me know how you go.

    Regards

    Thread Starter nr123

    (@nr123)

    Hello, thank you for the reply. Have tested the full URL including the “https://example.com/logoLocation” and the “logoUrl () failed to load” error still occurs on every load of the stripe modal.

    Also we are not use the Price field intentionally as we are using the Variable Price option as outlined in your Accepting Donations article : https://www.tipsandtricks-hq.com/how-to-accept-donation-via-stripe-from-your-wordpress-site-easily-7811

    Any other ideas on these two errors?

    Thank you for your time ??

    Thread Starter nr123

    (@nr123)

    Apologies forgot to clearly specify that we are following the “Allow the Visitor to Specify a Custom Donation Amount” with your Accepting Donations article : https://www.tipsandtricks-hq.com/how-to-accept-donation-via-stripe-from-your-wordpress-site-easily-7811

    Both errors are still occuring.

    Thank you ??

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, sorry I was not aware you were following the accept donation steps. Are you still receiving an error in regards to your logo? What is the logo full URL path?

    Do you have a cache plugin installed? Do you have Live Mode enabled in the plugin settings?

    Thread Starter nr123

    (@nr123)

    Hello, thank you for the prompt response.

    For the “Invalid item price” error, yes have disabled all cache/optimisation plugins and have tried Live mode, the error still persists.

    For the logoUrl error, this one is now fixed. I used the logo image on the Stripe servers. They provide the URL for this image embedded in their documentation (https://stripe.com/docs/checkout/tutorial). This fixed the issue. The original logoUrl error must be to do with a settings error on my WordPress configuration preventing other websites from loading images from our website.

    Look forward to assistance with the “Invalid item price” error which still persists.

    Thank you ??

    Plugin Support mbrsolution

    (@mbrsolution)

    Can you share your URL with the donation cart?

    Thread Starter nr123

    (@nr123)

    Thank you. I private messaged you the URL on your mbrsolution profile website facebook page. Looking forward to hearing back from you. Thank you ??

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, I viewed your site and from the frontend it all looks okay to me. Have you had a talk with Stripe support staff about this issue?

    Thread Starter nr123

    (@nr123)

    Hello, thank you for checking the website.

    The returned error message is not a Stripe error message.

    The “Invalid item price” is being generated by the plugin code itself.

    Specifically, ..\stripe-payments\public\includes\class-shortcode-asp.php
    Line 265 to 275

            if (!is_numeric($item_price)) {
               <strong> echo ('Invalid item price');</strong>
                return;
            }
            if ($item_price == 0) { //Custom amount
                $item_price = floatval($_POST['stripeAmount']);
                if (!is_numeric($item_price)) {
                   <strong> echo ('Invalid item price');</strong>
                    return;
                }
            }

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

    On checking the logs in the Stripe website admin interface it shows the session token as successful however there is no attempt to send the charge transaction through to Stripe.

    On checking the plugin code, this plugin error message returns before even the Charge transaction to Stripe takes place.

    Are you able to assist in correcting this issue?

    Thank you kindly.

    • This reply was modified 7 years, 6 months ago by bdbrown.
    • This reply was modified 7 years, 6 months ago by bdbrown.
    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, I have sent a message to the plugin developers to investigate further your issue.

    Kind regards

    Thread Starter nr123

    (@nr123)

    Hello, it is definately a plugin coding issues.

    Here is a proposed workable solution.

    Change, ..\stripe-payments\public\includes\class-shortcode-asp.php
    Line 265 to 275

    if (!is_numeric($item_price)) {
    <strong> echo (‘Invalid item price’);</strong>
    return;
    }
    if ($item_price == 0) { //Custom amount
    $item_price = floatval($_POST[‘stripeAmount’]);
    if (!is_numeric($item_price)) {
    <strong> echo (‘Invalid item price’);</strong>
    return;
    }
    }

    Change it to this code :

    if (!is_numeric($item_price)) {
                $item_price = floatval($_POST['stripeAmount']);
                if (!is_numeric($item_price)) {
                    echo ('Invalid item price');
                    return;
                }
            }

    Also uncomment Line 262 :

    $item_price = sanitize_text_field($_POST['item_price']);

    And comment Line 264 :

    $item_price = get_transient($trans_name); //Read the price for this item from the system.

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

    Are you able to make these changes to the plugin on its next update? Or at least correct the issue in your own way so that myself and others don’t have the same repeat issue on any plugin updates?

    Thank you for your time and creating a great plugin ??

    • This reply was modified 7 years, 6 months ago by bdbrown.
    Thread Starter nr123

    (@nr123)

    Thank you, only just saw your reply.

    Hope the solution above is simple for them to implement.

    Thank you.

    Plugin Author mra13

    (@mra13)

    I am not understanding why the code needs to be change. Remember, there are other features that gets triggered based on that code. If the code is changed the way you suggested, it will break another feature.

    If you are using our shortcode the way it is suppose to, then you shouldn’t get any error message. A shortcode MUST have the price parameter present and it must have a numeric value using numbers from 0-9.

    What shortcode are you using that is producing an error?

    I am not subscribed to this thread but keep getting email updates – can anyone tell me how to stop this as it’s driving me mad!

    Plugin Author mra13

    (@mra13)

    When you post on this thread, simply uncheck the checkbox that says the following:

    
    Notify me of follow-up replies via email
    
Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Invalid item price + logoUrl () failed to load’ is closed to new replies.