From d7a16202ddfccfa82c51798c1020b1cf7f9b4ec1 Mon Sep 17 00:00:00 2001 From: Tobia Zanarella Date: Wed, 31 Mar 2021 11:20:47 +0200 Subject: [PATCH] Last finalization --- src/IntesaSanPaoloClient.php | 4 ++++ src/Models/PaymentSimulated.php | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/IntesaSanPaoloClient.php b/src/IntesaSanPaoloClient.php index ee84cc8..6952880 100644 --- a/src/IntesaSanPaoloClient.php +++ b/src/IntesaSanPaoloClient.php @@ -387,6 +387,10 @@ public function createInstantPayment( PaymentExecution $payment ): PaymentExecut $data['resubmitId'] = $payment->getResubmitId(); } + if( is_null( $data['siaCode'] ) ) { + $data['siaCode'] = ''; + } + $paymentExecutedResponse = $this->request( 'POST', sprintf( '%s/payments/sct/instant', $this->getApiBaseUri() ), [], $data ); return new PaymentExecuted( $paymentExecutedResponse ); diff --git a/src/Models/PaymentSimulated.php b/src/Models/PaymentSimulated.php index aa7bee1..2dc1545 100755 --- a/src/Models/PaymentSimulated.php +++ b/src/Models/PaymentSimulated.php @@ -6,12 +6,11 @@ class PaymentSimulated extends GenericPaymentResult { /** + * [ ACCP accepted, RJCT rejected ] * @var string */ private $ValidationStatus; - - /** * Hydrates specific data * @param stdClass $data @@ -24,7 +23,6 @@ protected function hydrateData( stdClass $data ) { $this->ValidationStatus = $payload->validationStatus; } - /** * @return string|null */