Hey all, really stuck with this PayPal stuff. Stil...
# support
k
Hey all, really stuck with this PayPal stuff. Still getting
Payee(s) passed in transaction does not match expected merchant id. Please ensure you are passing merchant-id=UAQHKSDFIT or <mailto:merchant-id-kasdgjgsdgsd@personal.example.com|merchant-id-kasdgjgsdgsd@personal.example.com> to the sdk url.
unfortunately. I am: • Using
gem "solidus_paypal_braintree", github: "solidusio/solidus_paypal_braintree", branch: :master
• requiring
solidus_paypal_braintree/frontend
in JS • requiring
spree/backend/solidus_paypal_braintree
in JS • requiring
spree/backend/solidus_paypal_braintree
in CSS This is my spree.rb:
Copy code
config.static_model_preferences.add(
    SolidusPaypalBraintree::Gateway,
    "braintree_env_credentials", {
      environment: Rails.env.production? ? "production" : "sandbox",
      merchant_id: ENV["BRAINTREE_MERCHANT_ID"],
      public_key: ENV["BRAINTREE_PUBLIC_KEY"],
      private_key: ENV["BRAINTREE_PRIVATE_KEY"],
      paypal_flow: "checkout",
      use_data_collector: true # Fingerprint the user's browser when using PayPal
    }
  )
Have tried
use_data_collector
as both true and false (not sure what is best?) I am using the API keys from Braintree Sandbox for above merchant ID, public key and private key. I have also set the PayPal sandbox credentials inside Processing Options on Braintree gateway, which is linked to the PayPal developer sandbox account. My Rails app is v6.1.6.1, Solidus 3.1 and Solidus paypal braintree is 1.1.1. We’re using cssbundling-rails + jsbundling-rails for JS. I feel like it’s something small but I cannot figure it out 🤦‍♂️ thanks!!!
r
Hey @Kurtis 👋 data_collector shouldn’t matter here according to the error. But it seems to be pointing to your credentials. Checklist: 1. Can you check that the credentials are exactly the same (don’t share them) as you see in the Braintree (Braintree sandbox for development)? a. Check
SolidusPaypalBraintree::Gateway.first.preferences
w
Yeah, it looks like you're not providing the correct credentials
k
Hey Ryan! Yes, I’ve checked a few times. I’ve even set it up manually opposed to using the credentials
As in, created it all inside /admin
Just to be sure, should I be using an API Key or Toenkization Key?
I am currently using API key
Also, should
Client SDK enabled?
and
Token generation enabled?
be on or off?
I am just playing with them at the moment to try figure it out
r
For context if you use that spree Snippet you shared, the
PaymentMethod
should be setup with static preferences. Therefore,
SolidusPaypalBraintree::Gateway.first.preference_source
should be
braintree_env_credentials
. (You’ll also need to set the ENV variables). Otherwise in admin you can change the
PaymentMethod
to not use static preferences and just manually type them in. If you see the credentials are correct as per
SolidusPaypalBraintree::Gateway.first.preferences
. Then there’s probably something wrong elsewhere with the frontend views and JS. In the extension, there’s a partial that gives the credentials to the JS. I am on mobile right now and can’t look into the possibilities. But this should help you narrow down the source of the problem.
k
Thank you Ryan. I believe you are right re: JS
I will look into that
Hey @Ryan Woods, I see you crossed out the JS bits. Is that because you have found it isn’t JS related?
r
I don’t think so @Kurtis (sorry, I was getting confused with our Solidus PCP extension).
k
That’s okay. I appreciate your time