Skip to content

Commit 5279f8c

Browse files
committed
Store terminal response in payment metadata after successful push
1 parent ee946ab commit 5279f8c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Services/PaymentHandlers/PaystackTerminal/Terminal.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ public function pushToTerminal(Payment $payment): string
122122
throw new \Exception("Could not push to terminal. " . json_encode($responseJson));
123123
}
124124

125+
$payment->update([
126+
'metadata' => [
127+
'terminal-response' => $responseJson,
128+
...$payment->metadata,
129+
],
130+
]);
131+
125132
return $responseJson['data']['id'];
126133
}
127134

0 commit comments

Comments
 (0)