Support » Plugin: RestroPress - Online Food Ordering System » Stripe – “Unable to locate Payment Method”

  • Resolved tugbucket

    (@tugbucket)


    As of August 15th, Stripe no longer works. Upon submit, it redirects to <site>checkout/?payment-mode=stripe and shows the error of “Unable to locate Payment Method”

    I have checked the admin settings and nothing has changed, all api keys are there and correct. I checked Stripe and the webhook is correct. I’m not seeing any console errors but looking at your code in the Stripe add-on:

    		$payment_method_id     = isset( $_POST['payment_method_id'] ) ? sanitize_text_field( $_POST['payment_method_id'] ) : false;
    		$payment_method_exists = isset( $_POST['payment_method_exists'] ) ? 'true' == $_POST['payment_method_exists'] : false;
    
    		if ( ! $payment_method_id ) {
    			throw new \Exception( esc_html__( 'Unable to locate Payment Method.', 'rpstripe' ) );
    		}

    $payment_method_id is not being set anymore. Can you please update your Stripe plugin or resolve the issue.

    Site is running WP 5.5 everything has been submitting fine until August 15th.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Kshirod Patel

    (@kshirod-patel)

    Hello,

    We are really sorry for the issue. Can you please let us know have you made any update to your theme what you are using or any changes have you done with your theme?

    Kind Regards,
    Team RestroPress,

    Thread Starter tugbucket

    (@tugbucket)

    There haven’t been any updates to the theme, it’s custom, besides some CSS since August 12th. Stripe processing worked fine on August 14th then failed on August 15th to date. The only change is updating WP to 5.5.

    In the Stripe plugin, on line 50~ of payment-actions.php, if I print the $_POST data, I get:

    Array
    (
        [rpress_first] => 
        [rpress_last] => 
        [rpress_email] => 
        [rpress_phone] =>
        [rpress_order_note] => 
        [payment-mode] =>
        [rpress_action] =>
        [page_id] =>
        [card_name] =>
        [card_address] =>
        [card_address_2] => 
        [card_city] =>
        [card_zip] =>
        [billing_country] =>
        [card_state] =>
        [rpress-user-id] =>
        [rpress-gateway] =>
    )

    and the code is specifically looking for $_POST['payment_method_id'] which doesn’t exist thus throwing the exception.

    RestroPress 2.6.1
    Strip Add-on version unknown
    WP 5.5

    Been looking into it and haven’t found the issue yet.

    Thread Starter tugbucket

    (@tugbucket)

    Rolling back to WP 5.4.2 resolves the error but obviously doesn’t fix the issue.

    Plugin Contributor Kshirod Patel

    (@kshirod-patel)

    Hello @tugbucket ,

    Ok we are looking into the issue and will release an update on this soon. If you want you can create a ticket here.

    Kind Regards,
    Team RestroPress,

    Thread Starter tugbucket

    (@tugbucket)

    Ticket opened. Thanks.

    Plugin Contributor Kshirod Patel

    (@kshirod-patel)

    Hello,

    We have replied to the ticket.

    Thanks and Regards,
    Team RestroPress,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Stripe – “Unable to locate Payment Method”’ is closed to new replies.