checkout / checkout-sdk-php

Checkout SDK for PHP
MIT License
48 stars 39 forks source link

Get Payment detail : Missing approved key for Sofort #237

Open benschumi opened 8 months ago

benschumi commented 8 months ago

Environment

Description

When I make a payment with Sofort in sandbox environment, the key "approved" is missing in the data returned, wich is causing an error in our app. With Ideal or Multibanco, the key is present. Last thursday, everything was working fine for Sofort.

Here the result for the payment 'pay_riis4xtdlhbehdfzfzstfloxui'

array:12 [▼
  "http_metadata" => HttpMetadata {#3855 ▼
    -reason_phrase: "OK"
    -status_code: 200
    -headers: array:5 [▶]
    -protocol: "1.1"
  }
  "id" => "pay_riis4xtdlhbehdfzfzstfloxui"
  "requested_on" => "2024-02-26T10:55:19.9492421Z"
  "source" => array:4 [▼
    "type" => "sofort"
    "iban" => "BE67234023456789"
    "bic" => "SFRTBE20XXX"
    "account_holder_name" => "Max Mustermann"
  ]
  "amount" => 6999
  "currency" => "EUR"
  "payment_type" => "Regular"
  "reference" => "275"
  "status" => "Pending"
  "customer" => array:4 [▶]
  "shipping" => array:4 [▶]
  "_links" => array:2 [▶]
]

In the documentation, the fields approved is tagged as 'required' in the response with code 200

https://api-reference.checkout.com/#operation/getPaymentDetails

Thanks for your help

armando-rodriguez-cko commented 8 months ago

Hi @benschumi, thank you, I gonna to review your comments.

benschumi commented 8 months ago

I've typed a wrong version number of the sdk in my description, I've corrected it Version : 3.0.18

armando-rodriguez-cko commented 3 days ago

Hi @benschumi. This error was probably occurring in the API response, could you confirm that this behavior no longer occurs?