Undefined array key \"giftcard\" in \/app\/xxx\/vendor\/adyen\/module-payment\/Helper\/GiftcardPayment.php on line 116
Both are pointing to the same value $stateData['giftcard']['balance']['value']. Once adyenSaveStateData mutation call, any orders after that errors for the same reason above, even if I change the payment with other payment methods. The stateData I am sending for adyenSaveStateData looks like:
(I thought the error is looking for \"balance\":{\"currency\":\"CAD\",\"value\":5000}, so I added in the call, but still failing for the same error)
its response looks fine:
after I added the missing \"balance\":{\"currency\":\"CAD\",\"value\":5000}, I needed to delete the cart to re-test it. it was already fixed, sorry for false alarm!
Hello,
We're trying to build a Gift Card partial payment following this documentation.
As we use the headless version, we're calling
adyenPaymentMethodsBalance
query andadyenSaveStateData
mutation first, that work fine.Then calling
placeOrder
when there's enough balance, errors with this (https://github.com/Adyen/adyen-magento2/blob/develop/Gateway/Http/Client/TransactionPayment.php#L124):Or calling
adyenRedeemedGiftcards
also errors with similar message in different place (https://github.com/Adyen/adyen-magento2/blob/develop/Helper/GiftcardPayment.php#L116):Both are pointing to the same value
$stateData['giftcard']['balance']['value']
. OnceadyenSaveStateData
mutation call, any orders after that errors for the same reason above, even if I change the payment with other payment methods. ThestateData
I am sending foradyenSaveStateData
looks like:(I thought the error is looking for
\"balance\":{\"currency\":\"CAD\",\"value\":5000}
, so I added in the call, but still failing for the same error) its response looks fine:The
placeOrder
mutation example:Response:
Can anybody see what I am doing wrong here? Please advise. Thank you!
Magento version [e.g. 2.4.1]
Plugin version 9.4.0 (Magento 2 plugin adyen-php-api-library/17.2.0)
Smartphone (please complete the following information): Testing on iPhone XR (OS 17.3.1), Galaxy S9 (Android 10)