Dear Support,
We are trying to integrate Squareup for a while now. First was not showing locations problem. We solve it by hardcoding locations.
$locations = array(
‘’ => __( ‘Please choose a location’, ‘woocommerce-square’ ),
‘LM6BGV8TMA5AK’ => __( ‘Parkmore Supplements’, ‘LM6BGV8TMA5AK’ ),
‘LWYJDNN60JVJA’ => __( ‘Parkmore Supplements LLC’, ‘LWYJDNN60JVJA’ ),
‘L55K8M38NS9Y1’ => __( ‘Website’, ‘L55K8M38NS9Y1’ ),
);
And now the console shows.
Square: Requesting payment nonce
square.js?ver=3.0.0:1 Square: Card data received
square.js?ver=3.0.0:1 Square: [object Object]
wc-square.min.js?ver=3.0.0:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘postalCode’)
at WC_Square_Payment_Form_Handler.handle_card_nonce_response (wc-square.min.js?ver=3.0.0:1:5921)
at wc-square.min.js?ver=3.0.0:1:5030
I am getting this in the log
05-05-2022 @ 13:33:50 - Request
method:
uri: retrieveCustomer/BE6T9S14A0WEDE3RXTK3MTBZR0
user-agent: WooCommerce-Square/3.0.0 (WooCommerce/6.3.1; WordPress/5.9.3)
headers: Array
(
)
body:
duration: 0.40077s
05-05-2022 @ 13:33:50 - Response
code: 200
message:
headers: Array
(
[0] => HTTP/2 200
[date] => Thu, 05 May 2022 13:33:50 GMT
[frame-options] => DENY
[x-frame-options] => DENY
[x-content-type-options] => nosniff
[x-xss-protection] => 1; mode=block
[content-type] => application/json
[square-version] => 2021-10-20
[squareup–connect–v2–common–versionmetadata-bin] => CgoyMDIxLTEwLTIw
[vary] => Accept-Encoding, User-Agent
[content-encoding] => gzip
[content-length] => 428
[strict-transport-security] => max-age=631152000; includeSubDomains; preload
)
body: {
“customer”: {
“id”: “BE6T9S14A0WEDE3RXTK3MTBZR0”,