From a6e16581d7f64f6be5d823ad8c07cae00d121c95 Mon Sep 17 00:00:00 2001 From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com> Date: Mon, 11 Sep 2023 09:34:53 +0200 Subject: [PATCH] Update PaymentDetails.php --- src/PaymentDetails.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PaymentDetails.php b/src/PaymentDetails.php index 61a07a8..988b3d6 100644 --- a/src/PaymentDetails.php +++ b/src/PaymentDetails.php @@ -29,7 +29,9 @@ public static function from_json( $method, $json ) { $details = new PaymentDetails(); - foreach ( $json as $key => $value ) { + $data = (array) $json; + + foreach ( $data as $key => $value ) { $details->{$key} = $value; }