• Resolved i1100a

    (@i1100a)


    Hey there!

    We’re getting this error during checkout when clicking the Paypal button, while on sandbox:

    "PayPal payment options are invalid."

    This is what we see in the console:

    POST https://api.sandbox.braintreegateway.com/merchants/mb4fbzgkgq493xvc/client_api/v1/paypal_hermes/create_payment_resource 422

    update_client_config_error 
    {err: "Error: Expected an order id to be passed?    at ht…currency=USD&vault=false&intent=capture:2:367121)", timestamp: "1600222970815", referer: "www.sandbox.paypal.com", sdkCorrelationID: "15fab7bc95a16", sessionID: "17a832bd1f_mdi6mji6mjy", …}
    buttonCorrelationID: "aa2a7ef97ddd9"
    buttonSessionID: "51f61d2f45_mdi6mji6mjg"
    env: "sandbox"
    err: "Error: Expected an order id to be passed?    at ht"
    referer: "www.sandbox.paypal.com"
    sdkCorrelationID: "15fab7bc95a16"
    sessionID: "17a832bd1f_mdi6mji6mjy"
    timestamp: "1600222970815"
    buttons?fundingSourc…re&commit=true:1098 
    unhandled_error 
    {err: "Error: Expected an order id to be passed?    at ht…currency=USD&vault=false&intent=capture:2:367121)", timestamp: "1600227674195", referer: "www.sandbox.paypal.com", sdkCorrelationID: "15fab7bc95a16", sessionID: "0d2026ba6a_mdm6nde6mdc", …}
    buttonCorrelationID: "d681d362bcb5f"
    buttonSessionID: "66dfc2cfb1_mdm6nde6mta"
    env: "sandbox"
    err: "Error: Expected an order id to be passed?    at ht"
    referer: "www.sandbox.paypal.com"

    sdkCorrelationID: “15fab7bc95a16”
    sessionID: “0d2026ba6a_mdm6n

    I have double checked we have the correct credentials from Braintree and also we have linked a sandbox paypal account to Braintree.

    Any ideas on what might be causing this? I have already deactivated all plugins but WC and Braintree Payments.

    Let me know if there are more details that can be useful. The background story is a bit long so I’m cutting to the chase a bit here to keep it simple.

    Thanks in advance.

    • This topic was modified 4 years, 5 months ago by i1100a.

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @i1100a,

    Thank you for contacting us. I reviewed your checkout page and here is the PayPal error associated with the more generic invalid payment option notice you see:

    {"error":{"message":"Merchant account not found"},"fieldErrors":[]}

    I can see a merchant account is being used but it seems that account isn’t associated with the API keys you have configured.

    Navigate to the plugin’s Advanced Settings > Merchant Account Settings and click the import button. Once you do that test again and let me know if that resolves the issue.

    Kind Regards,

    Thread Starter i1100a

    (@i1100a)

    Thank you so much! This did in fact resolved the issue.

    I was able to login in Paypal using the personal sandbox account I created earlier and pay, however, once I returned to the website I got this error:

    “There was an error processing your payment. Reason: Customer ID is invalid.”

    What am I doing wrong?

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @i1100a,

    I wasn’t able to re-create that error when I created a test order (#53618).

    That error message is usually associated with a Javascript error triggered by another plugin on the checkout page which prevents the Braintree plugin from injecting the payment nonce into the checkout form before it’s submitted.

    Kind Regards,

    Plugin Author Payment Plugins

    (@mrclayton)

    @i1100a,

    One thing I noticed is your cart page appears to be aggressively cached because although your checkout page shows the correct merchant account, the cart page is still showing the old merchant account before you followed my instructions on importing using the new API keys.

    It’s possible that caching is the culprit on your checkout page. I created several test orders and did not encounter any issues though.

    Kind Regards,

    Thread Starter i1100a

    (@i1100a)

    @mrclayton

    Quick update:

    I disabled cache and tested some more. I tried as a guest customer and this time the order went through, so somehow logged in users (admins at least) seem to trigger the “customer id” invalid error.

    It does not make a lot of sense, I’ll investigate it further. Just wanted to update in case anybody else gets this error. Also, any ideas are more than welcome!

    Plugin Author Payment Plugins

    (@mrclayton)

    @i1100a

    To Resolve the customer ID error you can navigate to the edit user profile page within the admin dashboard of WordPress and delete your Braintree vault ID.

    The customer ID error is almost always caused by a merchant switching their API keys to a different account and so their old customer ID is mapping to the old Braintree account and not the new one. That is why you don’t experience that issue as a guest user or as a regular customer logged in.

    Kind regards

    Thread Starter i1100a

    (@i1100a)

    @mrclayton

    That was it! Thank you, I inherited this website from a developer that is no longer around and I had tried everything I could think of but was unaware of this issue and it was driving me insane.

    One last thing, do you know is there a way to bulk delete old customer ID’s? I’m working on a staging environment, a sort of recent copy of production, and would like, if possible, to get a cleaner slate to work on.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @i1100a,

    In order to bulk delete the Braintree Vault ID’s from your wordpress database you would need to run an SQL query. The fields you would want to delete are located in the usermeta table:

    meta_key: braintree_sandbox_vault_id
    meta_key: braintree_production_vault_id

    Kind Regards,

    Thread Starter i1100a

    (@i1100a)

    @mrclayton

    I’ve been working on another website simultaneously and run again into what I think is the same error after moving from staging to production: no customer id.

    Just visiting the checkout triggers this error: There was an error loading the PayPal SDK. Please provide the following details to your plugin developer.PayPal config: undefinedPayPal SDK query: https://www.paypal.com/sdk/js?components=buttons,messages¤cy=USD&vault=false&commit=false&intent=capture

    Visting that url display this: SDK Validation error: ‘Expected client-id to be passed'”, which makes me think is related to the fact we moved the website.

    However, this time deleting the Braintree Vault ID and updating profile does not create it, instead the logging shows: ERROR Error saving customer’s payment methods on User Profile page. Reason: is an invalid customer id.

    All of this seems to be related to mismatching API keys or something. I went to Merchant Accounts, deleted it, and re-imported it. Still no luck.

    What else can I try? Btw, this is the website: https://shop.ibericoscovap.us/checkout/

    Thanks in advance

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @i1100a,

    The issue you’re experiencing is related to you not linking your PayPal account to your Braintree account.

    Now that you have migrated from staging to production, you must link your PayPal business account in the Braintree control panel of your production environment.

    Kind Regards,

    Thread Starter i1100a

    (@i1100a)

    @mrclayton

    Once again, you were right. Client had not setup Paypal in Braintree for production.

    Thank you very much!

    BTW: The support for this plugin is by far the best I’ve experienced. So happy with your help.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @i1100a,

    Awesome, glad I could help! If you have a moment I always appreciate a good review on the www.ads-software.com page:

    https://www.ads-software.com/support/plugin/woo-payment-gateway/reviews/

    Kind Regards,

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Checkout issue: Expected order id’ is closed to new replies.