@@ -26,57 +26,57 @@ public function getData()
2626 ],
2727 ];
2828
29- if ( (bool ) $ this ->getCreateToken () ) {
29+ if ((bool ) $ this ->getCreateToken ()) {
3030 $ data ['storeCard ' ] = true ;
3131 }
3232
33- if ( $ this ->getStoredCardIndicator () ) {
33+ if ($ this ->getStoredCardIndicator ()) {
3434 $ data ['storedCardIndicator ' ] = $ this ->getStoredCardIndicator ();
3535 }
3636
37- if ( $ this ->getRecurringExpiry () ) {
37+ if ($ this ->getRecurringExpiry ()) {
3838 $ data ['recurringExpiry ' ] = $ this ->getRecurringExpiry ();
3939 }
4040
41- if ( $ this ->getRecurringFrequency () ) {
41+ if ($ this ->getRecurringFrequency ()) {
4242 $ data ['recurringFrequency ' ] = $ this ->getRecurringFrequency ();
4343 }
4444
45- if ( $ this ->getToken () || $ this ->getCardReference () ) {
45+ if ($ this ->getToken () || $ this ->getCardReference ()) {
4646 $ data ['cardId ' ] = $ this ->getToken () ?? $ this ->getCardReference ();
4747 }
4848
49- if ( is_array ($ this ->getPaymentMethods ()) ) {
49+ if (is_array ($ this ->getPaymentMethods ())) {
5050 $ data ['methods ' ] = $ this ->getPaymentMethods ();
5151 }
5252
53- if ( is_array ($ this ->getCardTypes ()) ) {
53+ if (is_array ($ this ->getCardTypes ())) {
5454 $ data ['cardTypes ' ] = $ this ->getCardTypes ();
5555 }
5656
57- if ( is_array ($ this ->getMetadata ()) ) {
57+ if (is_array ($ this ->getMetadata ())) {
5858 $ data ['metaData ' ] = $ this ->getMetadata ();
5959 }
6060
6161 $ merchantReference = $ this ->getMerchantReference () ?? $ this ->getDescription ();
6262
63- if ( $ merchantReference ) {
63+ if ($ merchantReference ) {
6464 $ data ['merchantReference ' ] = $ merchantReference ;
6565 }
6666
67- if ( $ this ->getReturnUrl () ) {
67+ if ($ this ->getReturnUrl ()) {
6868 $ data ['callbackUrls ' ]['approved ' ] = $ this ->getReturnUrl ();
6969 }
7070
71- if ( $ this ->getDeclineUrl () ) {
71+ if ($ this ->getDeclineUrl ()) {
7272 $ data ['callbackUrls ' ]['declined ' ] = $ this ->getDeclineUrl ();
7373 }
7474
75- if ( $ this ->getCancelUrl () ) {
75+ if ($ this ->getCancelUrl ()) {
7676 $ data ['callbackUrls ' ]['cancelled ' ] = $ this ->getCancelUrl ();
7777 }
7878
79- if ( $ this ->getNotifyUrl () ) {
79+ if ($ this ->getNotifyUrl ()) {
8080 $ data ['notificationUrl ' ] = $ this ->getNotifyUrl ();
8181 }
8282
@@ -163,7 +163,12 @@ public function sendData($data)
163163 'Authorization ' => 'Basic ' . $ this ->getAuthorization (),
164164 ];
165165
166- $ httpResponse = $ this ->httpClient ->request ('POST ' , $ this ->getEndpoint ('sessions ' ), $ headers , json_encode ($ data ));
166+ $ httpResponse = $ this ->httpClient ->request (
167+ 'POST ' ,
168+ $ this ->getEndpoint ('sessions ' ),
169+ $ headers ,
170+ json_encode ($ data )
171+ );
167172
168173 try {
169174 $ responseData = json_decode ($ httpResponse ->getBody ()->getContents ());
0 commit comments