Title: JavaScript error (Google Pay method)
Last modified: January 17, 2024

---

# JavaScript error (Google Pay method)

 *  Resolved [Quixtar](https://wordpress.org/support/users/quixtar/)
 * (@quixtar)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-google-pay-method/)
 * Hi,
 * I got this JS error when trying to complete a test payment using Gpay:
   `Uncaught(
   in promise) TypeError: Cannot read properties of undefined (reading 'indexOf')
   at GooglePay.<anonymous> (wc-braintree.min.js?ver=3.2.51:1837:49)
 * ![](https://i0.wp.com/i.imgur.com/CWHgp7f.png?ssl=1)
 * And console.log(arr) return this:
   `TypeError: this.get_3ds_amount is not a functionat
   wc_braintree.CreditCard.process_3dsecure (wc-braintree.min.js?ver=3.2.51:2098:
   34)at GooglePay. (wc-braintree.min.js?ver=3.2.51:1827:76)11:52:55.264
 * Gpay payment was working fine until the current moment. Also disabling 3D secure
   setting helps and payment goes fine. Maybe something has changed in the Gpay 
   system?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-google-pay-method/#post-17352309)
 * Hi [@quixtar](https://wordpress.org/support/users/quixtar/),
 * We are able to re-create this error when 3DS for GPay is enabled. We will work
   on an update and include a fix in the next release.
 * Kind Regards

Viewing 1 replies (of 1 total)

The topic ‘JavaScript error (Google Pay method)’ is closed to new replies.

 * ![](https://ps.w.org/woo-payment-gateway/assets/icon-256x256.png?rev=2142799)
 * [Payment Plugins Braintree For WooCommerce](https://wordpress.org/plugins/woo-payment-gateway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-payment-gateway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-payment-gateway/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-payment-gateway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-payment-gateway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-payment-gateway/reviews/)

## Tags

 * [3DS](https://wordpress.org/support/topic-tag/3ds/)
 * [GPay](https://wordpress.org/support/topic-tag/gpay/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 1 reply
 * 2 participants
 * Last reply from: [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/javascript-error-google-pay-method/#post-17352309)
 * Status: resolved