Square doesn't work with Magento 2

 Hello,

 

I'm using Magento 2. I bought Square plugin from https://github.com/mage2pro/square, installed it, signed up for https://squareup.com/login and set it all up for sandbox mode.

 

When inspecting the code, I can see 

 

SqPaymentForm initialized in Sandbox Mode. See https://docs.connect.squareup.com/articles/using-sandbox/

 

message which is good.

 

However, the errors happen when - 

 

1. I add test values to form on checkout 

 

Card number: 4111 1111 1111 1111
Expiration date: 12/21
CVV: 111

and add post code to Postal Code field, it give me error in paymentform:1 

Uncaught TypeError: Cannot read property 'element' of undefined
    at C.sendIframeMessage (paymentform:1)
    at C.setPostalCode (paymentform:1)
    at I.setPostalCode (paymentform:1)
    at UiClass.<anonymous> (main.js:390)
    at Function.notifySubscribers (knockout.js:1103)
    at Function.observable.valueHasMutated (knockout.js:1300)
    at observable (knockout.js:1285)
    at Object.writeValueToProperty (knockout.js:2337)
    at HTMLInputElement.valueUpdateHandler (shipping.js:304)
    at HTMLInputElement.dispatch (jquery.js:4624)

 

 

2. I click on Buy button on checkout page, I'm getting

 

"Cannot call SqPaymentForm#requestCardNonce before SqPaymentForm is ready."

 

error message when I try to place an order.

 

Does anybody have any idea what is wrong with this and how I can sort it, please? Any help would be appreciated.

 

Thanks

1,178 Views
Message 1 of 2
Report
1 REPLY 1

Are you on the latest version? Looking at their Github issues, I notice there has been a fix with the same error you posted. If you're already on the latest version, you'd probably get better results posting an issue in their Github page. 

 

Have you tried using Square's Magento 2 module in the Magento Marketplace?

1,173 Views
Message 2 of 2
Report