Skip to content

Commit 55e157e

Browse files
authored
Update SuccessPaymentResponse.php
1 parent f7ea5cb commit 55e157e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Objects/Responses/SuccessPaymentResponse.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ public function getCardLast4Digits(): string
6262

6363
public function getOriginalData(): array|stdClass
6464
{
65-
return json_decode(base64_decode($this->data->udf1));
65+
// get all keys starts with udf, concat all values of the keys "udf1","udf2"
66+
$udfs = collect($this->data)
67+
->filter(fn ($value, $key) => Str::startsWith($key, 'udf'))
68+
->sortKeys()
69+
->values()
70+
->implode('');
71+
return json_decode(base64_decode($udfs));
6672
}
6773

6874
/**

0 commit comments

Comments
 (0)