Forums / Addon Payment Modules / Adding Braintree payment module

Adding Braintree payment module

Views: 83,422

Results 201 to 214 of 214
27 Jan 2025, 2:25 PM
#201
neekfenwick avatar

neekfenwick

New Zenner

Join Date:
Feb 2009
Posts:
101
Plugin Contributions:
0

Adding Braintree payment module

Update: I read through the Google Pay docs at https://developers.google.com/pay/api/web/guides/resources/demos and the Paypal/Braintree ones at https://developer.paypal.com/braintree/docs/guides/google-pay/client-side/javascript/v3/, and have found if I go to pay.google.com and at the top right get the Merchant ID, a 16 character alpha-numerical string like ABCD1234DEFG4567 and edit braintree_api to pass that in the call to the google pay API, i.e.:

braintree.googlePayment.create({
    client: clientInstance,
    googlePayVersion: 2,
    googleMerchantId: 'ABCD1234DEFG4567' // EDIT, was: " . MODULE_PAYMENT_BRAINTREE_MERCHANTID . "
}, function (googlePaymentErr, googlePaymentInstance) {

Then the google pay form does appear correctly, at least on my dev machine. I'm having trouble getting it to work on live, but it seems to show that the payment module is incorrect in trying to pass the Braintree Merchant ID value from the Zen admin panel. I don't know if using the Braintree ID is supposed to be a substitute for the Google Pay one and i'd been getting something else wrong in the config, the documentation is all rather confusing. I'll keep poking it tomorrow.

27 Jan 2025, 6:02 PM
#202
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Adding Braintree payment module

To clarify, is your issue only with Google Pay under Braintree? Does regular Braintree for Credit Card processing work?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

28 Jan 2025, 2:01 AM
#203
neekfenwick avatar

neekfenwick

New Zenner

Join Date:
Feb 2009
Posts:
101
Plugin Contributions:
0

Re: Adding Braintree payment module

swguy:

To clarify, is your issue only with Google Pay under Braintree? Does regular Braintree for Credit Card processing work?

Thanks, yes, the three credit card fields initialise OK and normal credit/debit card payments work fine when these are filled in, and these initialise using the MODULE_PAYMENT_BRAINTREE_MERCHANTID constant, which is our company name in lowercase. Our problem is when we enable the "Google Pay" radio button on the Braintree admin panel and the JS from braintree_api.php tries to put the Google Pay button on the checkout page. The button appears OK, but when clicked was raising a popup form from Google with the OR_BIBED_11 I mentioned earlier. I had tried putting in our Google Payments Profile ID (a 12 digit number), then stumbled on the pay.google.com merchant ID string and finally the popup payment form loads OK, on my dev system at least.

Side note, surnames with an apostrophe like "O'Neill" cause a syntax error and cause the three credit card fields to fail to init, due to this line, so I also modified the module to properly escape all the strings used in that section:
surname: '".$order->billing['lastname']."',

28 Jan 2025, 3:17 PM
#204
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Adding Braintree payment module

If what you want is Google Pay, the most recent version of Square provides it.

https://docs.zen-cart.com/user/payment/square_commercial_module/

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

29 Jan 2025, 2:55 AM
#205
neekfenwick avatar

neekfenwick

New Zenner

Join Date:
Feb 2009
Posts:
101
Plugin Contributions:
0

Re: Adding Braintree payment module

swguy:

If what you want is Google Pay, the most recent version of Square provides it.[/url]

OK, thank you for that. We would prefer to get the Braintree payment module working, so that all transactions go through one portal (normal credit/debit cards, google pay, apple pay) and it's a single platform on which to handle transactions, refunds, analytics etc. I could check the module's source code to see how it uses the Google Pay API config, but apparently you have to pay for it.

I finally figured out that to get Google Pay working on the production Braintree platform you need your Google Pay business console at https://pay.google.com/business/console, in the Google Pay API section, add a new Integration for our website ("Integrate your website", choose Integration Type 'Gateway' and fill in the screenshots of your business (they accepted mine even though step 4 "Google Pay API payment screen" was showing the OR_BIBED_11 error still). Next day I got email notification saying my application was successful. Now, the Google Pay button raises the payment dialog successfully, with my hack to the braintree_api.php file to pass our Google Pay Merchant ID instead of the Braintree Merchant ID (as I described earlier).

To double check, after the Google Pay API integration registration was successful, I tried reverting the braintree_api.php code so that it passes our Braintree Merchant Id (lower case company name) as in the out-of-the-box code, but it fails with OR_BIBED_11 again.

So, I still think the payment module needs modification for this googleMerchantId field (which I think would mean a new config entry and input field on the admin panel for the Google Pay Merchant ID value). It would really help if the documentation supplied with it was improved as well, as it's very bare bones. Maybe Numinix is hoping to get more people paying for installation by not documenting the steps required.

I'm also in talks with Braintree tech support on the Apple Pay side, because the Certificate Signing Request you download from their site to give to Apple appears to be a 256 bit key and not the 2048 bit key required by Apple and is rejected when you try to upload it to the Apple Developer site, I'll try to feed back here on what happens in case it helps others.

29 Jan 2025, 11:43 AM
#206
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Adding Braintree payment module

neekfenwick:

OK, thank you for that. We would prefer to get the Braintree payment module working, so that all transactions go through one portal (normal credit/debit cards, google pay, apple pay) and it's a single platform on which to handle transactions, refunds, analytics etc.

Again, square does all this so consider it if you continue to luck out.

29 Apr 2025, 6:37 PM
#207
n8pbm avatar

n8pbm

Zen Follower

Join Date:
Mar 2005
Posts:
146
Plugin Contributions:
0

Re: Adding Braintree payment module

It looks like there is a separate module for the Braintree/Google Pay portion by Numinix. It is on their website but is a paid version. The Braintree module appears to not have that function build in without the added module.

I just spent the weekend getting the braintree module updated by the Numinix team to work on my cart. The newest version released on their website appears to fix my issues.

FYI

29 Apr 2025, 6:40 PM
#208
n8pbm avatar

n8pbm

Zen Follower

Join Date:
Mar 2005
Posts:
146
Plugin Contributions:
0

Re: Adding Braintree payment module

royaldave:

Again, square does all this so consider it if you continue to luck out.

I would consider the switch but the rates I get from Braintree is much better. So it was worth the effort to get this module working. That may be the same for neekfenwick. I just don't have the need for Google Pay yet.

Thanks

30 Apr 2025, 4:26 AM
#209
neekfenwick avatar

neekfenwick

New Zenner

Join Date:
Feb 2009
Posts:
101
Plugin Contributions:
0

Re: Adding Braintree payment module

n8pbm:

It looks like there is a separate module for the Braintree/Google Pay portion by Numinix. It is on their website but is a paid version. The Braintree module appears to not have that function build in without the added module.

I just spent the weekend getting the braintree module updated by the Numinix team to work on my cart. The newest version released on their website appears to fix my issues.

FYI

Interesting, thank you for the feedback. I seem to recall there is a general problem talking with the Numinix team, but I might be referring to hearsay and one guy's bad experience. The JS code in the latest version I downloaded seemed quite poorly written, with mishandling of Promises leading to mostly harmless console errors, but that kind of thing makes one think the module is poorly tested or supported. I've reported bugs in the module on this thread with no reply from anyone closely associated with the module.

What problems did they fix in the module for your cart? Were they core bugs in the payment module (e.g. fixing a broken component that would help everyone), or something unique to your situation?

30 Apr 2025, 12:18 PM
#210
n8pbm avatar

n8pbm

Zen Follower

Join Date:
Mar 2005
Posts:
146
Plugin Contributions:
0

Re: Adding Braintree payment module

I eventually got support to email me and we were able to work out issues. It did take a while to get to that part. I assume because this is a free plugin the support is not a priority. However, once i got someone they have responded quickly. The fixes were applied to V3.1.3 on their website. However they have release two more versions that I have not tried.

My issues were installation problems, then not being to able to checkout after entering a credit card. Part of the issue is my account does not have 3D secure enabled and that was fixed in v3.1.3. I still get depreciation logs and a few error logs that I have sent over to support. Maybe the newest version takes care of those but I just have not tried it yet.

10 Apr 2026, 5:51 PM
#211
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Adding Braintree payment module

RELEASED - Version 3.8.9

  • Google Pay support improved (early 3.0.x)

  • Added configurable order totals selector for Google Pay updates (3.0.8).

  • Credit-card security & hosted fields enhancements (3.1.0)

  • Added 3D Secure (3DS) toggle/config.

  • Expanded hosted-fields styling controls:

  • JSON-based input styling.

  • Separate iframe/container CSS styling options.

  • Database/schema hardening (3.1.4)

  • Installer adds missing Braintree transaction/profile columns automatically.

  • Adjusts legacy columns to allow nullable values where appropriate.

  • Wallet/address/order bugfix cycle (3.4.x)

  • Billing address validation tightened (email/phone requirements).

  • Cart discount and Apple Pay address-line handling fixes.

  • Platform compatibility update (3.5.0)

  • Updated for Zen Cart 2.0.0+.

  • Hosted Fields auth/reliability improvements (3.7.2–3.7.5)

  • Added optional tokenization key fallback (3.7.2).

  • Added configurable API connection timeout (3.7.3).

  • Clarified styling config labels/docs and refreshed default hosted-field CSS (3.7.4/3.7.5).

  • Multi-currency merchant account support (3.7.6+)

  • Added Merchant Account ID override config (including per-currency mapping formats).

  • Continued description clarifications in later installers (3.7.7, 3.8.3).

  • Major SDK modernization (3.8.0)

  • Upgraded Braintree SDK/web integration.

  • 3.8.x bugfix and UX/admin improvements

  • 3.8.1: Authorize/Capture mode fixes.

  • 3.8.2: Tax calculation fixes on cart/product wallet flows.

  • 3.8.3: Currency/settlement behavior clarified in admin descriptions.

  • 3.8.4: Added Wallet User Account Type setting (Guest vs Registered).

  • 3.8.5: Wallet state-matching bugfixes.

  • 3.8.6–3.8.8: version-maintenance installer bumps.

  • 3.8.9: fixes for Google/Apple Pay when products include display-only attributes.

10 Apr 2026, 6:01 PM
#212
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Adding Braintree payment module

Important note about Apple Pay and Google Pay

Google Pay and Apple Pay require separate plugins that are currently under review and will be available for free download in the Zen Cart Plugins directory shortly.

Once listed, the links will be added to this thread, or you can find them under PLUGINS > PAYMENT MODULES > Braintree Apple Pay / Braintree Google Pay

15 Apr 2026, 12:06 AM
#213
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Adding Braintree payment module

Note: if the Apple and Google Pay modules are still unavailable (possibly due to backlog) in the Zen Cart Plugins section, you can download them for free from numinix.com (link in signature).

15 Apr 2026, 6:08 AM
#214
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Adding Braintree payment module

They were approved before your last post, so I'm not sure what you're talking about.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.