Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on PaymentRequest with v16.1.0 #601

Closed
youvalteboul opened this issue Nov 30, 2023 · 3 comments
Closed

Error on PaymentRequest with v16.1.0 #601

youvalteboul opened this issue Nov 30, 2023 · 3 comments

Comments

@youvalteboul
Copy link

Hello,

I'm encountering an issue when trying to proceed with a payment using the Adyen SDK (16.1.0).
It seems that the Adyen\Model\Checkout\PaymentRequest object provided by the SDK is setting default values, such as for authenticationOnly, and I'm receiving the following error:

Capture d’écran 2023-11-30 à 14 12 33

PaymentRequest

^ Adyen\Model\Checkout\PaymentRequest {#552
  #openAPINullablesSetToNull: []
  #container: array:67 [
    "accountInfo" => null
    "additionalAmount" => null
    "additionalData" => null
    "amount" => array:2 [
      "currency" => "EUR"
      "value" => 5661
    ]
    "applicationInfo" => null
    "authenticationData" => Adyen\Model\Checkout\AuthenticationData {#549
      #openAPINullablesSetToNull: []
      #container: array:3 [
        "attemptAuthentication" => "always"
        "authenticationOnly" => false
        "threeDSRequestData" => array:2 [
          "nativeThreeDS" => "preferred"
          "threeDSVersion" => "2.2.0"
        ]
      ]
    }
    "billingAddress" => null
    "browserInfo" => array:8 [
      "acceptHeader" => "*/*"
      "colorDepth" => 24
      "language" => "fr-FR"
      "javaEnabled" => false
      "screenHeight" => 1440
      "screenWidth" => 2560
      "userAgent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
      "timeZoneOffset" => -60
    ]
    "captureDelayHours" => null
    "channel" => "web"
    "checkoutAttemptId" => null
    "company" => null
    "conversionId" => null
    "countryCode" => null
    "dateOfBirth" => null
    "dccQuote" => null
    "deliverAt" => null
    "deliveryAddress" => null
    "deliveryDate" => null
    "deviceFingerprint" => null
    "enableOneClick" => null
    "enablePayOut" => null
    "enableRecurring" => null
    "entityType" => null
    "fraudOffset" => null
    "fundOrigin" => null
    "fundRecipient" => null
    "industryUsage" => null
    "installments" => null
    "lineItems" => null
    "localizedShopperStatement" => null
    "mandate" => null
    "mcc" => null
    "merchantAccount" => "__merchantAccount__"
    "merchantOrderReference" => "99999999"
    "merchantRiskIndicator" => null
    "metadata" => null
    "mpiData" => null
    "order" => null
    "orderReference" => null
    "origin" => "https://...."
    "paymentMethod" => array:8 [
      "type" => "scheme"
      "holderName" => "John Doe"
      "encryptedCardNumber" => "__encryptedCardNumber__"
      "encryptedExpiryMonth" => "__encryptedExpiryMonth__"
      "encryptedSecurityCode" => "__encryptedSecurityCode__"
      "brand" => "visa"
      "checkoutAttemptId" => "__checkoutAttemptId__"
    ]
    "platformChargebackLogic" => null
    "recurringExpiry" => null
    "recurringFrequency" => null
    "recurringProcessingModel" => "CardOnFile"
    "redirectFromIssuerMethod" => null
    "redirectToIssuerMethod" => null
    "reference" => "99999999"
    "returnUrl" => "https://...."
    "riskData" => null
    "sessionValidity" => null
    "shopperEmail" => "[email protected]"
    "shopperIP" => "xxxx.xxxx.xxxx.xxxx"
    "shopperInteraction" => "Ecommerce"
    "shopperLocale" => null
    "shopperName" => Adyen\Model\Checkout\Name {#570
      #openAPINullablesSetToNull: []
      #container: array:2 [
        "firstName" => "John"
        "lastName" => "Doe"
      ]
    }
    "shopperReference" => "999999"
    "shopperStatement" => null
    "socialSecurityNumber" => null
    "splits" => null
    "store" => null
    "storePaymentMethod" => false
    "telephoneNumber" => null
    "threeDS2RequestData" => Adyen\Model\Checkout\ThreeDS2RequestFields {#571
      #openAPINullablesSetToNull: []
      #container: array:36 [
        "acctInfo" => null
        "acctType" => null
        "acquirerBIN" => null
        "acquirerMerchantID" => null
        "addrMatch" => null
        "authenticationOnly" => false
        "challengeIndicator" => null
        "deviceRenderOptions" => null
        "homePhone" => null
        "mcc" => null
        "merchantName" => null
        "messageVersion" => null
        "mobilePhone" => null
        "notificationURL" => null
        "payTokenInd" => null
        "paymentAuthenticationUseCase" => null
        "purchaseInstalData" => null
        "recurringExpiry" => null
        "recurringFrequency" => null
        "sdkAppID" => null
        "sdkEphemPubKey" => null
        "sdkMaxTimeout" => 60
        "sdkReferenceNumber" => null
        "sdkTransID" => null
        "threeDSCompInd" => null
        "threeDSRequestorAuthenticationInd" => null
        "threeDSRequestorAuthenticationInfo" => null
        "threeDSRequestorChallengeInd" => "03"
        "threeDSRequestorID" => null
        "threeDSRequestorName" => null
        "threeDSRequestorPriorAuthenticationInfo" => null
        "threeDSRequestorURL" => null
        "transType" => null
        "transactionType" => null
        "whiteListStatus" => null
        "workPhone" => null
      ]
    }
    "threeDSAuthenticationOnly" => false
    "trustedShopper" => null
  ]
}

I attempted to force a value of null (instead of false) for authenticationOnly, resulting in the following error:

Fatal error: Uncaught InvalidArgumentException: non-nullable authenticationOnly cannot be null in /.../vendor/adyen/php-api-library/src/Adyen/Model/Checkout/AuthenticationData.php:373 

Stack trace: 
#0 /.../AdyenPaymentManager.php: Adyen\Model\Checkout\AuthenticationData->setAuthenticationOnly(NULL) 
...
#12 {main} thrown in /var/www/instant-gaming/current/tools/vendor/adyen/php-api-library/src/Adyen/Model/Checkout/AuthenticationData.php on line 373

Thanks

@jillingk
Copy link
Contributor

jillingk commented Dec 4, 2023

Hi @youvalteboul,

Sorry for the delayed answer, but I have created an internal ticket to take a look at this default setting of bools!

Best, Jilling
Adyen

@Donneh
Copy link

Donneh commented Dec 11, 2023

I think I'm getting a related error while trying to make use of the hosted checkout.

The field 'threeDSAuthenticationOnly' is not supported when mode: 'hosted'.

@jillingk
Copy link
Contributor

Hi @youvalteboul and @Donneh,

These issues with default bools being set, should be solved now in the latest major release. Thanks for reaching out and here apologies for the wait.

Let us know if you run into anything else.

Best, Jilling
Adyen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants