- Issue created by @interlated
- π¦πΊAustralia interlated
I tried
$payment_request->setAmountMoney($square_total_money);
Result
{"errors": [@"code": "CARD_TOKEN_USED","detail": "Card nonce already used with a different idempotency key; please request new nonce.","category": "INVALID_REQUEST_ERROR"]}
It appears that $payment_method->getRemoteId() does give the same remote key
- π¦πΊAustralia interlated
This is me because I am working with the development version? I probably should repeat the following
There are components
- module version itself
- Square/square library as a composer dependency
- javascript front endI think there should be a requirements check and system status warning. Surface the versions loaded.
Module - I had patched the module custom installed as an attempt to get it working php 8.2. I solved this in the end by setting 8.1 as a the php config parameter in composer.
- I then didn't apply the 1.7 tag and got commerce/square version 1.4. Ideally not specify the version. The default seems to be 1.4. Comes with "square/connect": "^2.20190925.0" which isn't near square/square 17.2 and could be the cause of the nonce issue.- I ended up with an older version of the javascript loaded. drush cr didn't help with this, only toggling settings under 'performance'. So I ended up with the 'no input settings' symptom as per
Also had 'no input settings'. Missing the drupal settings in the javascript file entirely.
https://www.drupal.org/project/commerce_square/issues/3093086 βI'm happy to take a look at square/square v 34 integration again.
- πΊπ¦Ukraine marchuk.vitaliy Rivne, UA
@interlated
Fixed as part of this issue https://www.drupal.org/project/commerce_square/issues/3338931 π Update square/square dependency in order to support PHP 8.2 Fixed .
Please use branch 8.x-1.x for testing. - π¦πΊAustralia interlated
Does this PHP SDK have to match the SDK selected in the Square portal? I didn't find the documentation clear on this. I read it as "Must be greater than" and chose the latest.
I'm not getting the latest version via composer. Seems like 8.x-1.7 - released Feb 2023. If I download I get a new version (Jan 2024?)
version: '8.x-1.7'
Your requirements could not be resolved to an installable set of packages.
Problem 1
- square/square 17.2.0.20220216 requires php >=7.2 <8.1 -> your php version (8.2; overridden via config.platform, actual: 8.2.12) does not satisfy that requirement.
- square/square 17.3.0.20220316 requires php >=7.2 <8.2 -> your php version (8.2; overridden via config.platform, actual: 8.2.12) does not satisfy that requirement.
- drupal/commerce_square 1.7.0 requires square/square ^17.2 -> satisfiable by square/square[17.2.0.20220216, 17.3.0.20220316].
- Root composer.json requires drupal/commerce_square ^1.7 -> satisfiable by drupal/commerce_square[1.7.0].I installed it via composer file - composer.json
"repositories": [ { "type": "path", "url": "./packages/drupal/commerce_square", "options": { "symlink": true } }, ... "require": { "drupal/commerce_square": "@dev",
I'll let you know how the testing goes.
- πΊπ¦Ukraine marchuk.vitaliy Rivne, UA
@interlated
You must use branch 8.x-1.x https://www.drupal.org/project/commerce_square/releases/8.x-1.x-dev β because it contains the latest changes.