Ich häng mich hier einfach mal dran …
Wir machen gerade ein Upgrade von 4.10.5 auf 4.10.6 und wollen das bestit amazon-Modul nutzen. Einstellungen: Sandbox-Modus, Autorisierung synchron, Statusupdates per cron, Capture nach Versenden.
Konkret ist das Problem, dass alles funktioniert bis zum cronjob. Wenn er dort versucht zu Capturen, kommt es zu einem Fehler.
Amazon-Sandbox meldet:
<Code>InvalidParameterValue</Code>
<Message>1 validation error detected: Value null at 'amazonAuthorizationId' failed to satisfy constraint: Member must not be null</Message>
Wenn man sich dann mal die Methode bestitAmazonPay4OxidClient::capture anschaut (übrigens genial die MacOS-Line-Endings, wenn man unter Linux arbeitet), sieht man, dass dort irgendwie nicht die Parameter verwendet werden, die laut amazon beim Capture erwartet sind (vgl. https://pay.amazon.com/us/developer/documentation/apireference/201752040).
Da wird amazon_order_reference_id übergeben, amazon braucht aber bei capture die amazon_authorization_id.
Also folgender Patch:
diff --git a/modules/bestit/amazonpay4oxid/application/models/bestitamazonpay4oxidclient.php b/modules/bestit/amazonpay4oxid/application/models/bestitamazonpay4oxidclient.php
index dd1279c..f9d97f1 100644
--- a/modules/bestit/amazonpay4oxid/application/models/bestitamazonpay4oxidclient.php
+++ b/modules/bestit/amazonpay4oxid/application/models/bestitamazonpay4oxidclient.php
@@ -708,7 +708,7 @@ class bestitAmazonPay4OxidClient extends bestitAmazonPay4OxidContainer
$oOrder,
$aRequestParameters,
array(
- 'amazon_order_reference_id',
+ 'amazon_authorization_id',
'capture_amount',
'currency_code',
'capture_reference_id',
Dann läuft auch das Capture durch. Ich vermute mal, dass es nicht nur in der Sandbox so ist, sondern auch im Produktivmodus ?
Also - nein, läuft unter 4.10.6 nicht out-of-the-box ohne Probleme, zumindest mal nicht so wie wir es nutzen wollen (und das ist ja auch die Defaulteinstellung).