@@ -68,5 +68,5 @@ |
||
| 68 | 68 | /** |
| 69 | 69 | * @return AccessToken |
| 70 | 70 | */ |
| 71 | - public function getToken():? AccessToken; |
|
| 71 | + public function getToken(): ? AccessToken; |
|
| 72 | 72 | } |
@@ -23,15 +23,15 @@ discard block |
||
| 23 | 23 | protected $options = []; |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * CheckoutClientInterface constructor. |
|
| 27 | - * @param ContextInterface $context |
|
| 26 | + * CheckoutClientInterface constructor. |
|
| 27 | + * @param ContextInterface $context |
|
| 28 | 28 | * @param array $options |
| 29 | 29 | */ |
| 30 | 30 | public function __construct(ContextInterface $context, ?array $options = []) |
| 31 | - { |
|
| 32 | - $this->context = $context; |
|
| 31 | + { |
|
| 32 | + $this->context = $context; |
|
| 33 | 33 | $this->options = $options; |
| 34 | - } |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @param $customer |
@@ -83,9 +83,9 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | public function getLastResponse(): ResponseInterface |
| 86 | - { |
|
| 87 | - return $this->lastResponse; |
|
| 88 | - } |
|
| 86 | + { |
|
| 87 | + return $this->lastResponse; |
|
| 88 | + } |
|
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | 91 | * @param ResponseInterface $response |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | /** |
| 147 | 147 | * @return AccessToken |
| 148 | 148 | */ |
| 149 | - public function getToken():? AccessToken |
|
| 149 | + public function getToken(): ? AccessToken |
|
| 150 | 150 | { |
| 151 | 151 | return $this->token; |
| 152 | 152 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @param CustomerInterface $customer |
| 13 | 13 | * @return CustomerInterface |
| 14 | 14 | */ |
| 15 | - public function create(CustomerInterface $customer):? CustomerInterface; |
|
| 15 | + public function create(CustomerInterface $customer): ? CustomerInterface; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * @param CustomerInterface $customer |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * |
| 88 | 88 | * @return string |
| 89 | 89 | */ |
| 90 | - public function getToken():? string |
|
| 90 | + public function getToken(): ? string |
|
| 91 | 91 | { |
| 92 | 92 | return $this->token; |
| 93 | 93 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * |
| 112 | 112 | * @return bool |
| 113 | 113 | */ |
| 114 | - public function getActive():? bool |
|
| 114 | + public function getActive(): ? bool |
|
| 115 | 115 | { |
| 116 | 116 | return $this->active; |
| 117 | 117 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * |
| 144 | 144 | * @return string |
| 145 | 145 | */ |
| 146 | - public function getType():? string |
|
| 146 | + public function getType(): ? string |
|
| 147 | 147 | { |
| 148 | 148 | return $this->type; |
| 149 | 149 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | * @see http://docs.sumup.com/rest-api/checkouts-api/#customers-payment-instruments-post |
| 173 | 173 | * @return array |
| 174 | 174 | */ |
| 175 | - public function getCard():? array |
|
| 175 | + public function getCard(): ? array |
|
| 176 | 176 | { |
| 177 | 177 | return [ |
| 178 | 178 | 'last_4_digits' => $this->getLast4Digits(), |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | * |
| 186 | 186 | * @return string |
| 187 | 187 | */ |
| 188 | - public function getLast4Digits():? string |
|
| 188 | + public function getLast4Digits(): ? string |
|
| 189 | 189 | { |
| 190 | 190 | return $this->last4Digits; |
| 191 | 191 | } |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | * |
| 210 | 210 | * @return string |
| 211 | 211 | */ |
| 212 | - public function getCardType():? string |
|
| 212 | + public function getCardType(): ? string |
|
| 213 | 213 | { |
| 214 | 214 | return $this->cardSchema; |
| 215 | 215 | } |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | return null; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - /** |
|
| 58 | + /** |
|
| 59 | 59 | * Retrieve a paymentInstrument from server and fill the $paymentInstrument Object with response. |
| 60 | - * |
|
| 61 | - */ |
|
| 60 | + * |
|
| 61 | + */ |
|
| 62 | 62 | public function get(): array |
| 63 | 63 | { |
| 64 | 64 | $response = []; |
@@ -70,20 +70,20 @@ discard block |
||
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | 72 | return $response; |
| 73 | - } |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - /** |
|
| 75 | + /** |
|
| 76 | 76 | * Delete an paymentInstrument from server. |
| 77 | - * |
|
| 77 | + * |
|
| 78 | 78 | * @param PaymentInstrumentInterface $paymentInstrument |
| 79 | 79 | * @return bool |
| 80 | - */ |
|
| 80 | + */ |
|
| 81 | 81 | public function disable(PaymentInstrumentInterface $paymentInstrument):?bool |
| 82 | 82 | { |
| 83 | 83 | $uri = $this->getEndPoint().'/'.$paymentInstrument->getToken(); |
| 84 | 84 | |
| 85 | 85 | return $this->request('delete', $paymentInstrument, $uri); |
| 86 | - } |
|
| 86 | + } |
|
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | 89 | * @return string |
@@ -93,14 +93,14 @@ discard block |
||
| 93 | 93 | return 'customers/'.$this->customer->getCustomerId().'/payment-instruments'; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - /** |
|
| 97 | - * Return last response of client |
|
| 98 | - * @return ResponseInterface |
|
| 99 | - */ |
|
| 96 | + /** |
|
| 97 | + * Return last response of client |
|
| 98 | + * @return ResponseInterface |
|
| 99 | + */ |
|
| 100 | 100 | public function getLastResponse(): ResponseInterface |
| 101 | - { |
|
| 101 | + { |
|
| 102 | 102 | return $this->lastResponse; |
| 103 | - } |
|
| 103 | + } |
|
| 104 | 104 | |
| 105 | 105 | /** |
| 106 | 106 | * @param ResponseInterface $response |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | * @param PaymentInstrumentInterface $paymentInstrument |
| 79 | 79 | * @return bool |
| 80 | 80 | */ |
| 81 | - public function disable(PaymentInstrumentInterface $paymentInstrument):?bool |
|
| 81 | + public function disable(PaymentInstrumentInterface $paymentInstrument): ?bool |
|
| 82 | 82 | { |
| 83 | - $uri = $this->getEndPoint().'/'.$paymentInstrument->getToken(); |
|
| 83 | + $uri = $this->getEndPoint() . '/' . $paymentInstrument->getToken(); |
|
| 84 | 84 | |
| 85 | 85 | return $this->request('delete', $paymentInstrument, $uri); |
| 86 | 86 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function getEndPoint(): string |
| 92 | 92 | { |
| 93 | - return 'customers/'.$this->customer->getCustomerId().'/payment-instruments'; |
|
| 93 | + return 'customers/' . $this->customer->getCustomerId() . '/payment-instruments'; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | /** |
| 134 | 134 | * @return AccessToken |
| 135 | 135 | */ |
| 136 | - public function getToken():? AccessToken |
|
| 136 | + public function getToken(): ? AccessToken |
|
| 137 | 137 | { |
| 138 | 138 | return $this->token; |
| 139 | 139 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @return null|string |
| 15 | 15 | */ |
| 16 | - public function getToken():? string; |
|
| 16 | + public function getToken(): ? string; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * @param null|string $token |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | /** |
| 36 | 36 | * @return null|string |
| 37 | 37 | */ |
| 38 | - public function getType():? string; |
|
| 38 | + public function getType(): ? string; |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * @param null|string $type |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | /** |
| 47 | 47 | * @return array|null |
| 48 | 48 | */ |
| 49 | - public function getCard():? array; |
|
| 49 | + public function getCard(): ? array; |
|
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | 52 | * @param array|null $data |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | /** |
| 58 | 58 | * @return null|string |
| 59 | 59 | */ |
| 60 | - public function getLast4Digits():? string; |
|
| 60 | + public function getLast4Digits(): ? string; |
|
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * @param null|string $digits |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * @return null|string |
| 70 | 70 | */ |
| 71 | - public function getCardType():? string; |
|
| 71 | + public function getCardType(): ? string; |
|
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * @param null|string $schema |
@@ -4,132 +4,132 @@ |
||
| 4 | 4 | |
| 5 | 5 | class Customer implements CustomerInterface |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * Customer SumUp ID |
|
| 9 | - * |
|
| 10 | - * @var string |
|
| 11 | - */ |
|
| 12 | - protected $customerId; |
|
| 13 | - |
|
| 14 | - /** |
|
| 15 | - * Customer Name |
|
| 16 | - * |
|
| 17 | - * @var string |
|
| 18 | - */ |
|
| 19 | - protected $name; |
|
| 20 | - |
|
| 21 | - /** |
|
| 22 | - * Customer phone |
|
| 23 | - * |
|
| 24 | - * @var string |
|
| 25 | - */ |
|
| 26 | - protected $phone; |
|
| 27 | - |
|
| 28 | - /** |
|
| 29 | - * Cusomter address |
|
| 30 | - * |
|
| 31 | - * @var AddressInterface |
|
| 32 | - */ |
|
| 33 | - protected $address; |
|
| 7 | + /** |
|
| 8 | + * Customer SumUp ID |
|
| 9 | + * |
|
| 10 | + * @var string |
|
| 11 | + */ |
|
| 12 | + protected $customerId; |
|
| 13 | + |
|
| 14 | + /** |
|
| 15 | + * Customer Name |
|
| 16 | + * |
|
| 17 | + * @var string |
|
| 18 | + */ |
|
| 19 | + protected $name; |
|
| 20 | + |
|
| 21 | + /** |
|
| 22 | + * Customer phone |
|
| 23 | + * |
|
| 24 | + * @var string |
|
| 25 | + */ |
|
| 26 | + protected $phone; |
|
| 27 | + |
|
| 28 | + /** |
|
| 29 | + * Cusomter address |
|
| 30 | + * |
|
| 31 | + * @var AddressInterface |
|
| 32 | + */ |
|
| 33 | + protected $address; |
|
| 34 | 34 | |
| 35 | 35 | public function __construct(?array $data = []) |
| 36 | - { |
|
| 37 | - $this->setCustomerId($data['customer_id']??null); |
|
| 38 | - $personal_details = $data['personal_details']??$data; |
|
| 39 | - $this->setName($personal_details['name']??null); |
|
| 40 | - $this->setPhone($personal_details['phone']??null); |
|
| 41 | - $this->setAddress(new Address($personal_details['address']??null)); |
|
| 42 | - } |
|
| 43 | - |
|
| 44 | - /** |
|
| 45 | - * Get customer SumUp ID |
|
| 46 | - * |
|
| 47 | - * @return string |
|
| 48 | - */ |
|
| 49 | - public function getCustomerId(): ?string |
|
| 50 | - { |
|
| 51 | - return $this->customerId; |
|
| 52 | - } |
|
| 53 | - |
|
| 54 | - /** |
|
| 55 | - * Set customer SumUp ID |
|
| 56 | - * |
|
| 57 | - * @param string $customerId Customer SumUp ID |
|
| 58 | - * @return CustomerInterface |
|
| 59 | - */ |
|
| 60 | - public function setCustomerId(?string $customerId): CustomerInterface |
|
| 61 | - { |
|
| 62 | - $this->customerId = $customerId; |
|
| 63 | - |
|
| 64 | - return $this; |
|
| 65 | - } |
|
| 66 | - |
|
| 67 | - /** |
|
| 68 | - * Get customer Name |
|
| 69 | - * |
|
| 70 | - * @return string |
|
| 71 | - */ |
|
| 72 | - public function getName(): ?string |
|
| 73 | - { |
|
| 74 | - return $this->name; |
|
| 75 | - } |
|
| 76 | - |
|
| 77 | - /** |
|
| 78 | - * Set customer Name |
|
| 79 | - * |
|
| 36 | + { |
|
| 37 | + $this->setCustomerId($data['customer_id']??null); |
|
| 38 | + $personal_details = $data['personal_details']??$data; |
|
| 39 | + $this->setName($personal_details['name']??null); |
|
| 40 | + $this->setPhone($personal_details['phone']??null); |
|
| 41 | + $this->setAddress(new Address($personal_details['address']??null)); |
|
| 42 | + } |
|
| 43 | + |
|
| 44 | + /** |
|
| 45 | + * Get customer SumUp ID |
|
| 46 | + * |
|
| 47 | + * @return string |
|
| 48 | + */ |
|
| 49 | + public function getCustomerId(): ?string |
|
| 50 | + { |
|
| 51 | + return $this->customerId; |
|
| 52 | + } |
|
| 53 | + |
|
| 54 | + /** |
|
| 55 | + * Set customer SumUp ID |
|
| 56 | + * |
|
| 57 | + * @param string $customerId Customer SumUp ID |
|
| 58 | + * @return CustomerInterface |
|
| 59 | + */ |
|
| 60 | + public function setCustomerId(?string $customerId): CustomerInterface |
|
| 61 | + { |
|
| 62 | + $this->customerId = $customerId; |
|
| 63 | + |
|
| 64 | + return $this; |
|
| 65 | + } |
|
| 66 | + |
|
| 67 | + /** |
|
| 68 | + * Get customer Name |
|
| 69 | + * |
|
| 70 | + * @return string |
|
| 71 | + */ |
|
| 72 | + public function getName(): ?string |
|
| 73 | + { |
|
| 74 | + return $this->name; |
|
| 75 | + } |
|
| 76 | + |
|
| 77 | + /** |
|
| 78 | + * Set customer Name |
|
| 79 | + * |
|
| 80 | 80 | * @param string $name Customer Name |
| 81 | 81 | * @return Customer|CustomerInterface |
| 82 | - */ |
|
| 83 | - public function setName(?string $name): CustomerInterface |
|
| 84 | - { |
|
| 85 | - $this->name = $name; |
|
| 86 | - |
|
| 87 | - return $this; |
|
| 88 | - } |
|
| 89 | - |
|
| 90 | - /** |
|
| 91 | - * Get customer phone |
|
| 92 | - * |
|
| 93 | - * @return string |
|
| 94 | - */ |
|
| 95 | - public function getPhone(): ?string |
|
| 96 | - { |
|
| 97 | - return $this->phone; |
|
| 98 | - } |
|
| 99 | - |
|
| 100 | - /** |
|
| 101 | - * Set customer phone |
|
| 102 | - * |
|
| 82 | + */ |
|
| 83 | + public function setName(?string $name): CustomerInterface |
|
| 84 | + { |
|
| 85 | + $this->name = $name; |
|
| 86 | + |
|
| 87 | + return $this; |
|
| 88 | + } |
|
| 89 | + |
|
| 90 | + /** |
|
| 91 | + * Get customer phone |
|
| 92 | + * |
|
| 93 | + * @return string |
|
| 94 | + */ |
|
| 95 | + public function getPhone(): ?string |
|
| 96 | + { |
|
| 97 | + return $this->phone; |
|
| 98 | + } |
|
| 99 | + |
|
| 100 | + /** |
|
| 101 | + * Set customer phone |
|
| 102 | + * |
|
| 103 | 103 | * @param string $phone Customer phone |
| 104 | 104 | * @return Customer|CustomerInterface |
| 105 | - */ |
|
| 106 | - public function setPhone(?string $phone): CustomerInterface |
|
| 107 | - { |
|
| 108 | - $this->phone = $phone; |
|
| 109 | - |
|
| 110 | - return $this; |
|
| 111 | - } |
|
| 112 | - |
|
| 113 | - /** |
|
| 114 | - * Get cusomter address |
|
| 115 | - * |
|
| 116 | - * @return AddressInterface |
|
| 117 | - */ |
|
| 118 | - public function getAddress(): AddressInterface |
|
| 119 | - { |
|
| 120 | - return $this->address; |
|
| 121 | - } |
|
| 122 | - |
|
| 123 | - /** |
|
| 124 | - * Set cusomter address |
|
| 125 | - * |
|
| 126 | - * @param AddressInterface $address |
|
| 127 | - * @return Customer|CustomerInterface |
|
| 128 | - */ |
|
| 129 | - public function setAddress(AddressInterface $address): CustomerInterface |
|
| 130 | - { |
|
| 131 | - $this->address = $address; |
|
| 132 | - return $this; |
|
| 133 | - } |
|
| 105 | + */ |
|
| 106 | + public function setPhone(?string $phone): CustomerInterface |
|
| 107 | + { |
|
| 108 | + $this->phone = $phone; |
|
| 109 | + |
|
| 110 | + return $this; |
|
| 111 | + } |
|
| 112 | + |
|
| 113 | + /** |
|
| 114 | + * Get cusomter address |
|
| 115 | + * |
|
| 116 | + * @return AddressInterface |
|
| 117 | + */ |
|
| 118 | + public function getAddress(): AddressInterface |
|
| 119 | + { |
|
| 120 | + return $this->address; |
|
| 121 | + } |
|
| 122 | + |
|
| 123 | + /** |
|
| 124 | + * Set cusomter address |
|
| 125 | + * |
|
| 126 | + * @param AddressInterface $address |
|
| 127 | + * @return Customer|CustomerInterface |
|
| 128 | + */ |
|
| 129 | + public function setAddress(AddressInterface $address): CustomerInterface |
|
| 130 | + { |
|
| 131 | + $this->address = $address; |
|
| 132 | + return $this; |
|
| 133 | + } |
|
| 134 | 134 | |
| 135 | 135 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | static function getCompleteUrl(CheckoutInterface $checkout): string |
| 124 | 124 | { |
| 125 | 125 | if ($checkout->getId()) { |
| 126 | - return SumUp::getEntrypoint().$checkout->getId(); |
|
| 126 | + return SumUp::getEntrypoint() . $checkout->getId(); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | return ''; |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | * @throws BadResponseException |
| 135 | 135 | * @throws ConnectException |
| 136 | 136 | */ |
| 137 | - public function create(CheckoutInterface $checkout, AccessToken $accessToken = null):? CheckoutInterface |
|
| 137 | + public function create(CheckoutInterface $checkout, AccessToken $accessToken = null): ? CheckoutInterface |
|
| 138 | 138 | { |
| 139 | 139 | return $this->request('post', $checkout) ? $checkout : null; |
| 140 | 140 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | * @param string|null $endpoint |
| 146 | 146 | * @return bool|null |
| 147 | 147 | */ |
| 148 | - public function request(string $action, $checkout, string $endpoint = null):? bool |
|
| 148 | + public function request(string $action, $checkout, string $endpoint = null): ? bool |
|
| 149 | 149 | { |
| 150 | 150 | if (!$checkout->isValid()) { |
| 151 | 151 | throw new InvalidCheckoutException($checkout); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * @throws BadResponseException |
| 160 | 160 | * @throws ConnectException |
| 161 | 161 | */ |
| 162 | - public function complete(CheckoutInterface $checkout, AccessToken $accessToken = null):? CheckoutInterface |
|
| 162 | + public function complete(CheckoutInterface $checkout, AccessToken $accessToken = null): ? CheckoutInterface |
|
| 163 | 163 | { |
| 164 | 164 | return $this->request('put', $checkout) ? $checkout : null; |
| 165 | 165 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | /** |
| 220 | 220 | * @return AccessToken |
| 221 | 221 | */ |
| 222 | - public function getToken():? AccessToken |
|
| 222 | + public function getToken(): ? AccessToken |
|
| 223 | 223 | { |
| 224 | 224 | return $this->currentToken; |
| 225 | 225 | } |
@@ -11,70 +11,70 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | class Checkout implements CheckoutInterface, PropertyHandlerInterface |
| 13 | 13 | { |
| 14 | - use PropertyHandler; |
|
| 15 | - |
|
| 16 | - const PENDING = 'PENDING'; |
|
| 17 | - const COMPLETED = 'COMPLETED'; |
|
| 18 | - const FAILED = 'FAILED'; |
|
| 19 | - |
|
| 20 | - protected $id; |
|
| 21 | - protected $status; |
|
| 22 | - protected $amount; |
|
| 23 | - protected $feeAmount; |
|
| 24 | - protected $currency; |
|
| 25 | - protected $payToEmail; |
|
| 26 | - protected $payFromEmail; |
|
| 27 | - protected $description; |
|
| 28 | - protected $redirectUrl; |
|
| 29 | - protected $validUntil; |
|
| 30 | - protected $token; |
|
| 31 | - protected $transactionId; |
|
| 32 | - protected $transactionCode; |
|
| 33 | - protected $type; |
|
| 34 | - protected $installments; |
|
| 35 | - |
|
| 36 | - /** |
|
| 37 | - * Checkout reference |
|
| 38 | - * |
|
| 39 | - * @var string |
|
| 40 | - */ |
|
| 41 | - protected $reference; |
|
| 42 | - |
|
| 43 | - /** |
|
| 44 | - * Customer |
|
| 45 | - * |
|
| 46 | - * @var null|Customer |
|
| 47 | - */ |
|
| 48 | - protected $customer; |
|
| 49 | - |
|
| 50 | - /** |
|
| 14 | + use PropertyHandler; |
|
| 15 | + |
|
| 16 | + const PENDING = 'PENDING'; |
|
| 17 | + const COMPLETED = 'COMPLETED'; |
|
| 18 | + const FAILED = 'FAILED'; |
|
| 19 | + |
|
| 20 | + protected $id; |
|
| 21 | + protected $status; |
|
| 22 | + protected $amount; |
|
| 23 | + protected $feeAmount; |
|
| 24 | + protected $currency; |
|
| 25 | + protected $payToEmail; |
|
| 26 | + protected $payFromEmail; |
|
| 27 | + protected $description; |
|
| 28 | + protected $redirectUrl; |
|
| 29 | + protected $validUntil; |
|
| 30 | + protected $token; |
|
| 31 | + protected $transactionId; |
|
| 32 | + protected $transactionCode; |
|
| 33 | + protected $type; |
|
| 34 | + protected $installments; |
|
| 35 | + |
|
| 36 | + /** |
|
| 37 | + * Checkout reference |
|
| 38 | + * |
|
| 39 | + * @var string |
|
| 40 | + */ |
|
| 41 | + protected $reference; |
|
| 42 | + |
|
| 43 | + /** |
|
| 44 | + * Customer |
|
| 45 | + * |
|
| 46 | + * @var null|Customer |
|
| 47 | + */ |
|
| 48 | + protected $customer; |
|
| 49 | + |
|
| 50 | + /** |
|
| 51 | 51 | * PaymentInstrument |
| 52 | - * |
|
| 53 | - * |
|
| 52 | + * |
|
| 53 | + * |
|
| 54 | 54 | * @var null|PaymentInstrument |
| 55 | - */ |
|
| 56 | - protected $card; |
|
| 55 | + */ |
|
| 56 | + protected $card; |
|
| 57 | 57 | |
| 58 | 58 | |
| 59 | - /** |
|
| 60 | - * checkout constructor |
|
| 61 | - * |
|
| 62 | - * @param array $data |
|
| 63 | - */ |
|
| 64 | - public function __construct(array $data = null) { |
|
| 65 | - if ($data !== null) { |
|
| 59 | + /** |
|
| 60 | + * checkout constructor |
|
| 61 | + * |
|
| 62 | + * @param array $data |
|
| 63 | + */ |
|
| 64 | + public function __construct(array $data = null) { |
|
| 65 | + if ($data !== null) { |
|
| 66 | 66 | $this->setAmount($data['amount']??0); |
| 67 | 67 | $this->setPayToEmail($data['pay_to_email']??''); |
| 68 | 68 | $this->setCheckoutReference($data['checkout_reference']??''); |
| 69 | 69 | $this->setCurrency($data['currency']??''); |
| 70 | - $this->setDescription($data['description']??null); |
|
| 71 | - $this->setFeeAmount($data['fee_amount']??null); |
|
| 72 | - $this->setPayFromEmail($data['pay_from_mail']??null); |
|
| 73 | - $this->setId($data['id']??null); |
|
| 74 | - $this->setRedirectUrl($data['redirect_url']??null); |
|
| 75 | - $this->setStatus($data['status']??null); |
|
| 76 | - } |
|
| 77 | - } |
|
| 70 | + $this->setDescription($data['description']??null); |
|
| 71 | + $this->setFeeAmount($data['fee_amount']??null); |
|
| 72 | + $this->setPayFromEmail($data['pay_from_mail']??null); |
|
| 73 | + $this->setId($data['id']??null); |
|
| 74 | + $this->setRedirectUrl($data['redirect_url']??null); |
|
| 75 | + $this->setStatus($data['status']??null); |
|
| 76 | + } |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * @inheritDoc |
@@ -86,55 +86,55 @@ discard block |
||
| 86 | 86 | return $this; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * @inheritDoc |
|
| 91 | - */ |
|
| 92 | - public function isValid(): bool { |
|
| 93 | - return $this->getReference() !== null |
|
| 94 | - && $this->getAmount() !== null |
|
| 95 | - && $this->getPayToEmail() !== null |
|
| 89 | + /** |
|
| 90 | + * @inheritDoc |
|
| 91 | + */ |
|
| 92 | + public function isValid(): bool { |
|
| 93 | + return $this->getReference() !== null |
|
| 94 | + && $this->getAmount() !== null |
|
| 95 | + && $this->getPayToEmail() !== null |
|
| 96 | 96 | && $this->getAmount() > 0 |
| 97 | - && Currency::isValid($this->getCurrency()); |
|
| 98 | - } |
|
| 97 | + && Currency::isValid($this->getCurrency()); |
|
| 98 | + } |
|
| 99 | 99 | |
| 100 | - /** |
|
| 100 | + /** |
|
| 101 | 101 | * Get checkout reference |
| 102 | 102 | * |
| 103 | 103 | * @return string |
| 104 | - */ |
|
| 104 | + */ |
|
| 105 | 105 | public function getReference(): ?string |
| 106 | 106 | { |
| 107 | 107 | return $this->reference; |
| 108 | - } |
|
| 108 | + } |
|
| 109 | 109 | |
| 110 | - /** |
|
| 110 | + /** |
|
| 111 | 111 | * Set checkout reference |
| 112 | 112 | * |
| 113 | 113 | * @param string $reference Checkout reference |
| 114 | 114 | * |
| 115 | 115 | * @return CheckoutInterface |
| 116 | - */ |
|
| 116 | + */ |
|
| 117 | 117 | public function setReference(?string $reference): CheckoutInterface |
| 118 | 118 | { |
| 119 | 119 | $this->reference = $reference; |
| 120 | 120 | |
| 121 | - return $this; |
|
| 122 | - } |
|
| 121 | + return $this; |
|
| 122 | + } |
|
| 123 | 123 | |
| 124 | - /** |
|
| 125 | - * @inheritDoc |
|
| 126 | - */ |
|
| 127 | - public function getAmount():? float { |
|
| 128 | - return $this->amount; |
|
| 129 | - } |
|
| 124 | + /** |
|
| 125 | + * @inheritDoc |
|
| 126 | + */ |
|
| 127 | + public function getAmount():? float { |
|
| 128 | + return $this->amount; |
|
| 129 | + } |
|
| 130 | 130 | |
| 131 | - /** |
|
| 132 | - * @inheritDoc |
|
| 133 | - */ |
|
| 134 | - public function setAmount(float $amount): CheckoutInterface { |
|
| 135 | - $this->amount = $amount > 0 ? $amount : null; |
|
| 136 | - return $this; |
|
| 137 | - } |
|
| 131 | + /** |
|
| 132 | + * @inheritDoc |
|
| 133 | + */ |
|
| 134 | + public function setAmount(float $amount): CheckoutInterface { |
|
| 135 | + $this->amount = $amount > 0 ? $amount : null; |
|
| 136 | + return $this; |
|
| 137 | + } |
|
| 138 | 138 | |
| 139 | 139 | /** |
| 140 | 140 | * @inheritDoc |
@@ -154,54 +154,54 @@ discard block |
||
| 154 | 154 | return $this; |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - /** |
|
| 158 | - * @inheritDoc |
|
| 159 | - */ |
|
| 160 | - public function getCurrency():? string { |
|
| 161 | - return $this->currency; |
|
| 162 | - } |
|
| 163 | - |
|
| 164 | - /** |
|
| 165 | - * @inheritDoc |
|
| 166 | - */ |
|
| 167 | - public function setCurrency(?string $currency): CheckoutInterface { |
|
| 168 | - $this->currency = $currency; |
|
| 169 | - return $this; |
|
| 170 | - } |
|
| 171 | - |
|
| 172 | - /** |
|
| 173 | - * @inheritDoc |
|
| 174 | - */ |
|
| 157 | + /** |
|
| 158 | + * @inheritDoc |
|
| 159 | + */ |
|
| 160 | + public function getCurrency():? string { |
|
| 161 | + return $this->currency; |
|
| 162 | + } |
|
| 163 | + |
|
| 164 | + /** |
|
| 165 | + * @inheritDoc |
|
| 166 | + */ |
|
| 167 | + public function setCurrency(?string $currency): CheckoutInterface { |
|
| 168 | + $this->currency = $currency; |
|
| 169 | + return $this; |
|
| 170 | + } |
|
| 171 | + |
|
| 172 | + /** |
|
| 173 | + * @inheritDoc |
|
| 174 | + */ |
|
| 175 | 175 | public function getId():? string |
| 176 | 176 | { |
| 177 | 177 | return $this->id; |
| 178 | - } |
|
| 178 | + } |
|
| 179 | 179 | |
| 180 | - /** |
|
| 181 | - * @inheritDoc |
|
| 182 | - */ |
|
| 180 | + /** |
|
| 181 | + * @inheritDoc |
|
| 182 | + */ |
|
| 183 | 183 | public function setId(?string $id): CheckoutInterface |
| 184 | 184 | { |
| 185 | 185 | $this->id = $id; |
| 186 | - return $this; |
|
| 187 | - } |
|
| 186 | + return $this; |
|
| 187 | + } |
|
| 188 | 188 | |
| 189 | - /** |
|
| 190 | - * @inheritDoc |
|
| 191 | - */ |
|
| 189 | + /** |
|
| 190 | + * @inheritDoc |
|
| 191 | + */ |
|
| 192 | 192 | public function getStatus():? string |
| 193 | 193 | { |
| 194 | 194 | return $this->status; |
| 195 | - } |
|
| 195 | + } |
|
| 196 | 196 | |
| 197 | - /** |
|
| 198 | - * @inheritDoc |
|
| 199 | - */ |
|
| 197 | + /** |
|
| 198 | + * @inheritDoc |
|
| 199 | + */ |
|
| 200 | 200 | public function setStatus(?string $status): CheckoutInterface |
| 201 | 201 | { |
| 202 | 202 | $this->status = $status; |
| 203 | - return $this; |
|
| 204 | - } |
|
| 203 | + return $this; |
|
| 204 | + } |
|
| 205 | 205 | |
| 206 | 206 | /** |
| 207 | 207 | * @inheritDoc |
@@ -211,198 +211,198 @@ discard block |
||
| 211 | 211 | return $this->reference; |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | - /** |
|
| 215 | - * @inheritDoc |
|
| 216 | - */ |
|
| 217 | - public function getDescription():? string { |
|
| 218 | - return $this->description; |
|
| 219 | - } |
|
| 220 | - |
|
| 221 | - /** |
|
| 222 | - * @inheritDoc |
|
| 223 | - */ |
|
| 224 | - public function setDescription(?string $description): CheckoutInterface { |
|
| 225 | - $this->description = $description; |
|
| 226 | - return $this; |
|
| 227 | - } |
|
| 228 | - |
|
| 229 | - /** |
|
| 230 | - * @inheritDoc |
|
| 231 | - */ |
|
| 232 | - public function getFeeAmount():? float { |
|
| 233 | - return $this->feeAmount; |
|
| 234 | - } |
|
| 235 | - |
|
| 236 | - /** |
|
| 237 | - * @inheritDoc |
|
| 238 | - */ |
|
| 239 | - public function setFeeAmount(?float $fee): CheckoutInterface { |
|
| 240 | - $this->feeAmount = $fee; |
|
| 241 | - return $this; |
|
| 242 | - } |
|
| 243 | - |
|
| 244 | - /** |
|
| 245 | - * @inheritDoc |
|
| 246 | - */ |
|
| 247 | - public function getPayFromEmail():? string { |
|
| 248 | - return $this->payFromEmail; |
|
| 249 | - } |
|
| 250 | - |
|
| 251 | - /** |
|
| 252 | - * @inheritDoc |
|
| 253 | - */ |
|
| 254 | - public function setPayFromEmail(?string $email): CheckoutInterface { |
|
| 255 | - $this->payFromEmail = $email; |
|
| 256 | - return $this; |
|
| 257 | - } |
|
| 258 | - |
|
| 259 | - /** |
|
| 260 | - * @inheritDoc |
|
| 261 | - */ |
|
| 262 | - public function getRedirectUrl():? string { |
|
| 263 | - return $this->redirectUrl; |
|
| 264 | - } |
|
| 265 | - |
|
| 266 | - /** |
|
| 267 | - * @inheritDoc |
|
| 268 | - */ |
|
| 269 | - public function setRedirectUrl(?string $url): CheckoutInterface { |
|
| 270 | - $this->redirectUrl = $url; |
|
| 271 | - return $this; |
|
| 272 | - } |
|
| 214 | + /** |
|
| 215 | + * @inheritDoc |
|
| 216 | + */ |
|
| 217 | + public function getDescription():? string { |
|
| 218 | + return $this->description; |
|
| 219 | + } |
|
| 220 | + |
|
| 221 | + /** |
|
| 222 | + * @inheritDoc |
|
| 223 | + */ |
|
| 224 | + public function setDescription(?string $description): CheckoutInterface { |
|
| 225 | + $this->description = $description; |
|
| 226 | + return $this; |
|
| 227 | + } |
|
| 228 | + |
|
| 229 | + /** |
|
| 230 | + * @inheritDoc |
|
| 231 | + */ |
|
| 232 | + public function getFeeAmount():? float { |
|
| 233 | + return $this->feeAmount; |
|
| 234 | + } |
|
| 235 | + |
|
| 236 | + /** |
|
| 237 | + * @inheritDoc |
|
| 238 | + */ |
|
| 239 | + public function setFeeAmount(?float $fee): CheckoutInterface { |
|
| 240 | + $this->feeAmount = $fee; |
|
| 241 | + return $this; |
|
| 242 | + } |
|
| 243 | + |
|
| 244 | + /** |
|
| 245 | + * @inheritDoc |
|
| 246 | + */ |
|
| 247 | + public function getPayFromEmail():? string { |
|
| 248 | + return $this->payFromEmail; |
|
| 249 | + } |
|
| 250 | + |
|
| 251 | + /** |
|
| 252 | + * @inheritDoc |
|
| 253 | + */ |
|
| 254 | + public function setPayFromEmail(?string $email): CheckoutInterface { |
|
| 255 | + $this->payFromEmail = $email; |
|
| 256 | + return $this; |
|
| 257 | + } |
|
| 258 | + |
|
| 259 | + /** |
|
| 260 | + * @inheritDoc |
|
| 261 | + */ |
|
| 262 | + public function getRedirectUrl():? string { |
|
| 263 | + return $this->redirectUrl; |
|
| 264 | + } |
|
| 265 | + |
|
| 266 | + /** |
|
| 267 | + * @inheritDoc |
|
| 268 | + */ |
|
| 269 | + public function setRedirectUrl(?string $url): CheckoutInterface { |
|
| 270 | + $this->redirectUrl = $url; |
|
| 271 | + return $this; |
|
| 272 | + } |
|
| 273 | 273 | |
| 274 | 274 | public function getValidUntil():? string |
| 275 | 275 | { |
| 276 | - return $this->validUntil; |
|
| 277 | - } |
|
| 276 | + return $this->validUntil; |
|
| 277 | + } |
|
| 278 | 278 | |
| 279 | 279 | public function setValidUntil(?string $timestamp): CheckoutInterface |
| 280 | 280 | { |
| 281 | - $this->validUntil = $timestamp; |
|
| 282 | - return $this; |
|
| 283 | - } |
|
| 281 | + $this->validUntil = $timestamp; |
|
| 282 | + return $this; |
|
| 283 | + } |
|
| 284 | 284 | |
| 285 | 285 | public function getTransactionCode():? string |
| 286 | 286 | { |
| 287 | - return $this->transactionCode; |
|
| 288 | - } |
|
| 287 | + return $this->transactionCode; |
|
| 288 | + } |
|
| 289 | 289 | |
| 290 | 290 | public function setTransactionCode(?string $code): CheckoutInterface |
| 291 | 291 | { |
| 292 | - $this->transactionCode = $code; |
|
| 293 | - return $this; |
|
| 294 | - } |
|
| 292 | + $this->transactionCode = $code; |
|
| 293 | + return $this; |
|
| 294 | + } |
|
| 295 | 295 | |
| 296 | 296 | public function getTransactionId():? string |
| 297 | 297 | { |
| 298 | - return $this->transactionId; |
|
| 299 | - } |
|
| 298 | + return $this->transactionId; |
|
| 299 | + } |
|
| 300 | 300 | |
| 301 | 301 | public function setTransactionId(?string $id): CheckoutInterface |
| 302 | 302 | { |
| 303 | - $this->transactionId = $id; |
|
| 304 | - return $this; |
|
| 305 | - } |
|
| 303 | + $this->transactionId = $id; |
|
| 304 | + return $this; |
|
| 305 | + } |
|
| 306 | 306 | |
| 307 | 307 | public function getTransactions():? array |
| 308 | 308 | { |
| 309 | 309 | // return $this->transactions; |
| 310 | - //TODO remember myself whats is it. |
|
| 311 | - return []; |
|
| 312 | - } |
|
| 310 | + //TODO remember myself whats is it. |
|
| 311 | + return []; |
|
| 312 | + } |
|
| 313 | 313 | |
| 314 | 314 | public function setTransactions(?Array $transactions): CheckoutInterface |
| 315 | 315 | { |
| 316 | 316 | // $this->transactions = $transactions; |
| 317 | - //TODO remember myself whats is it. |
|
| 318 | - return $this; |
|
| 319 | - } |
|
| 317 | + //TODO remember myself whats is it. |
|
| 318 | + return $this; |
|
| 319 | + } |
|
| 320 | 320 | |
| 321 | 321 | public function getToken():? string |
| 322 | 322 | { |
| 323 | - return $this->token; |
|
| 324 | - } |
|
| 323 | + return $this->token; |
|
| 324 | + } |
|
| 325 | 325 | |
| 326 | 326 | public function setToken(?string $token): CheckoutInterface |
| 327 | 327 | { |
| 328 | - $this->token = $token; |
|
| 329 | - return $this; |
|
| 330 | - } |
|
| 331 | - |
|
| 332 | - /** |
|
| 333 | - * Get customer |
|
| 334 | - * @return CustomerInterface|null |
|
| 335 | - */ |
|
| 336 | - public function getCustomer(): ?CustomerInterface |
|
| 337 | - { |
|
| 338 | - return $this->customer; |
|
| 339 | - } |
|
| 340 | - |
|
| 341 | - /** |
|
| 342 | - * Set customer |
|
| 343 | - * |
|
| 344 | - * @param null|CustomerInterface $customer Customer |
|
| 345 | - * |
|
| 346 | - * @return CheckoutInterface |
|
| 347 | - */ |
|
| 348 | - public function setCustomer(?CustomerInterface $customer): CheckoutInterface |
|
| 349 | - { |
|
| 350 | - $this->customer = $customer; |
|
| 351 | - |
|
| 352 | - return $this; |
|
| 353 | - } |
|
| 354 | - |
|
| 355 | - /** |
|
| 356 | - * Get card |
|
| 357 | - * |
|
| 328 | + $this->token = $token; |
|
| 329 | + return $this; |
|
| 330 | + } |
|
| 331 | + |
|
| 332 | + /** |
|
| 333 | + * Get customer |
|
| 334 | + * @return CustomerInterface|null |
|
| 335 | + */ |
|
| 336 | + public function getCustomer(): ?CustomerInterface |
|
| 337 | + { |
|
| 338 | + return $this->customer; |
|
| 339 | + } |
|
| 340 | + |
|
| 341 | + /** |
|
| 342 | + * Set customer |
|
| 343 | + * |
|
| 344 | + * @param null|CustomerInterface $customer Customer |
|
| 345 | + * |
|
| 346 | + * @return CheckoutInterface |
|
| 347 | + */ |
|
| 348 | + public function setCustomer(?CustomerInterface $customer): CheckoutInterface |
|
| 349 | + { |
|
| 350 | + $this->customer = $customer; |
|
| 351 | + |
|
| 352 | + return $this; |
|
| 353 | + } |
|
| 354 | + |
|
| 355 | + /** |
|
| 356 | + * Get card |
|
| 357 | + * |
|
| 358 | 358 | * @return null|PaymentInstrumentInterface |
| 359 | - */ |
|
| 359 | + */ |
|
| 360 | 360 | public function getCard(): ?PaymentInstrumentInterface |
| 361 | - { |
|
| 362 | - return $this->card; |
|
| 363 | - } |
|
| 361 | + { |
|
| 362 | + return $this->card; |
|
| 363 | + } |
|
| 364 | 364 | |
| 365 | - /** |
|
| 366 | - * Set card |
|
| 367 | - * |
|
| 365 | + /** |
|
| 366 | + * Set card |
|
| 367 | + * |
|
| 368 | 368 | * @param null|PaymentInstrumentInterface $card |
| 369 | - * |
|
| 370 | - * @return CheckoutInterface |
|
| 371 | - */ |
|
| 369 | + * |
|
| 370 | + * @return CheckoutInterface |
|
| 371 | + */ |
|
| 372 | 372 | public function setCard(?PaymentInstrumentInterface $card): CheckoutInterface |
| 373 | - { |
|
| 374 | - $this->card = $card; |
|
| 375 | - |
|
| 376 | - return $this; |
|
| 377 | - } |
|
| 378 | - |
|
| 379 | - /** |
|
| 380 | - * @return mixed |
|
| 381 | - */ |
|
| 382 | - public function getType():? string |
|
| 383 | - { |
|
| 384 | - return $this->type; |
|
| 385 | - } |
|
| 386 | - |
|
| 387 | - /** |
|
| 388 | - * @param mixed $type |
|
| 389 | - * @return CheckoutInterface |
|
| 390 | - */ |
|
| 391 | - public function setType(?string $type = null): CheckoutInterface |
|
| 392 | - { |
|
| 393 | - $this->type = $type; |
|
| 394 | - |
|
| 395 | - return $this; |
|
| 396 | - } |
|
| 373 | + { |
|
| 374 | + $this->card = $card; |
|
| 375 | + |
|
| 376 | + return $this; |
|
| 377 | + } |
|
| 378 | + |
|
| 379 | + /** |
|
| 380 | + * @return mixed |
|
| 381 | + */ |
|
| 382 | + public function getType():? string |
|
| 383 | + { |
|
| 384 | + return $this->type; |
|
| 385 | + } |
|
| 386 | + |
|
| 387 | + /** |
|
| 388 | + * @param mixed $type |
|
| 389 | + * @return CheckoutInterface |
|
| 390 | + */ |
|
| 391 | + public function setType(?string $type = null): CheckoutInterface |
|
| 392 | + { |
|
| 393 | + $this->type = $type; |
|
| 394 | + |
|
| 395 | + return $this; |
|
| 396 | + } |
|
| 397 | 397 | |
| 398 | 398 | public function getInstallments(): string |
| 399 | 399 | { |
| 400 | 400 | return $this->installments; |
| 401 | 401 | } |
| 402 | 402 | |
| 403 | - public function setInstallments(?string $installments): CheckoutInterface{ |
|
| 404 | - $this->installments = $installments; |
|
| 405 | - return $this; |
|
| 406 | - } |
|
| 403 | + public function setInstallments(?string $installments): CheckoutInterface{ |
|
| 404 | + $this->installments = $installments; |
|
| 405 | + return $this; |
|
| 406 | + } |
|
| 407 | 407 | |
| 408 | 408 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | /** |
| 125 | 125 | * @inheritDoc |
| 126 | 126 | */ |
| 127 | - public function getAmount():? float { |
|
| 127 | + public function getAmount(): ? float { |
|
| 128 | 128 | return $this->amount; |
| 129 | 129 | } |
| 130 | 130 | |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | /** |
| 140 | 140 | * @inheritDoc |
| 141 | 141 | */ |
| 142 | - public function getPayToEmail():? string |
|
| 142 | + public function getPayToEmail(): ? string |
|
| 143 | 143 | { |
| 144 | 144 | return $this->payToEmail; |
| 145 | 145 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | /** |
| 158 | 158 | * @inheritDoc |
| 159 | 159 | */ |
| 160 | - public function getCurrency():? string { |
|
| 160 | + public function getCurrency(): ? string { |
|
| 161 | 161 | return $this->currency; |
| 162 | 162 | } |
| 163 | 163 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | /** |
| 173 | 173 | * @inheritDoc |
| 174 | 174 | */ |
| 175 | - public function getId():? string |
|
| 175 | + public function getId(): ? string |
|
| 176 | 176 | { |
| 177 | 177 | return $this->id; |
| 178 | 178 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | /** |
| 190 | 190 | * @inheritDoc |
| 191 | 191 | */ |
| 192 | - public function getStatus():? string |
|
| 192 | + public function getStatus(): ? string |
|
| 193 | 193 | { |
| 194 | 194 | return $this->status; |
| 195 | 195 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | /** |
| 207 | 207 | * @inheritDoc |
| 208 | 208 | */ |
| 209 | - public function getCheckoutReference():? string |
|
| 209 | + public function getCheckoutReference(): ? string |
|
| 210 | 210 | { |
| 211 | 211 | return $this->reference; |
| 212 | 212 | } |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | /** |
| 215 | 215 | * @inheritDoc |
| 216 | 216 | */ |
| 217 | - public function getDescription():? string { |
|
| 217 | + public function getDescription(): ? string { |
|
| 218 | 218 | return $this->description; |
| 219 | 219 | } |
| 220 | 220 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | /** |
| 230 | 230 | * @inheritDoc |
| 231 | 231 | */ |
| 232 | - public function getFeeAmount():? float { |
|
| 232 | + public function getFeeAmount(): ? float { |
|
| 233 | 233 | return $this->feeAmount; |
| 234 | 234 | } |
| 235 | 235 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | /** |
| 245 | 245 | * @inheritDoc |
| 246 | 246 | */ |
| 247 | - public function getPayFromEmail():? string { |
|
| 247 | + public function getPayFromEmail(): ? string { |
|
| 248 | 248 | return $this->payFromEmail; |
| 249 | 249 | } |
| 250 | 250 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | /** |
| 260 | 260 | * @inheritDoc |
| 261 | 261 | */ |
| 262 | - public function getRedirectUrl():? string { |
|
| 262 | + public function getRedirectUrl(): ? string { |
|
| 263 | 263 | return $this->redirectUrl; |
| 264 | 264 | } |
| 265 | 265 | |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | return $this; |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | - public function getValidUntil():? string |
|
| 274 | + public function getValidUntil(): ? string |
|
| 275 | 275 | { |
| 276 | 276 | return $this->validUntil; |
| 277 | 277 | } |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | return $this; |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | - public function getTransactionCode():? string |
|
| 285 | + public function getTransactionCode(): ? string |
|
| 286 | 286 | { |
| 287 | 287 | return $this->transactionCode; |
| 288 | 288 | } |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | return $this; |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | - public function getTransactionId():? string |
|
| 296 | + public function getTransactionId(): ? string |
|
| 297 | 297 | { |
| 298 | 298 | return $this->transactionId; |
| 299 | 299 | } |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | return $this; |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | - public function getTransactions():? array |
|
| 307 | + public function getTransactions(): ? array |
|
| 308 | 308 | { |
| 309 | 309 | // return $this->transactions; |
| 310 | 310 | //TODO remember myself whats is it. |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | return $this; |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | - public function getToken():? string |
|
| 321 | + public function getToken(): ? string |
|
| 322 | 322 | { |
| 323 | 323 | return $this->token; |
| 324 | 324 | } |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | /** |
| 380 | 380 | * @return mixed |
| 381 | 381 | */ |
| 382 | - public function getType():? string |
|
| 382 | + public function getType(): ? string |
|
| 383 | 383 | { |
| 384 | 384 | return $this->type; |
| 385 | 385 | } |