@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | use Svea\WebPay\Config\ConfigurationService; |
9 | 9 | use Svea\WebPay\Response\SveaResponse; |
10 | 10 | |
11 | -if ( ! class_exists( 'EDU_SveaWebPay' ) ): |
|
11 | +if ( !class_exists( 'EDU_SveaWebPay' ) ): |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * EDU_SveaWebPay integrates EduAdmin-WordPress plugin with SveaWebPay as payment gateway |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | foreach ( $countries as $country ) { |
168 | 168 | if ( $invoiceCountry == $country['CountryName'] ) { |
169 | 169 | $selectedCountry = $country['CountryCode']; |
170 | - if ( ! empty( $country['CultureName'] ) ) { |
|
170 | + if ( !empty( $country['CultureName'] ) ) { |
|
171 | 171 | $selectedLocale = $country['CultureName']; |
172 | 172 | } |
173 | 173 | break; |
@@ -194,19 +194,19 @@ discard block |
||
194 | 194 | |
195 | 195 | $customer = WebPayItem::companyCustomer(); |
196 | 196 | |
197 | - if ( ! empty( $bookingInfo->Customer->InvoiceName ) ) { |
|
197 | + if ( !empty( $bookingInfo->Customer->InvoiceName ) ) { |
|
198 | 198 | $customer->setCompanyName( $bookingInfo->Customer->InvoiceName ); |
199 | 199 | } else { |
200 | 200 | $customer->setCompanyName( $bookingInfo->Customer->CustomerName ); |
201 | 201 | } |
202 | 202 | |
203 | - if ( ! empty( $bookingInfo->Customer->InvoiceAddress1 ) ) { |
|
203 | + if ( !empty( $bookingInfo->Customer->InvoiceAddress1 ) ) { |
|
204 | 204 | $customer->setStreetAddress( $bookingInfo->Customer->InvoiceAddress1 ); |
205 | 205 | } else { |
206 | 206 | $customer->setStreetAddress( $bookingInfo->Customer->Address1 ); |
207 | 207 | } |
208 | 208 | |
209 | - if ( ! empty( $bookingInfo->Customer->InvoiceZip ) ) { |
|
209 | + if ( !empty( $bookingInfo->Customer->InvoiceZip ) ) { |
|
210 | 210 | $customer->setZipCode( $bookingInfo->Customer->InvoiceZip ); |
211 | 211 | } else { |
212 | 212 | $customer->setZipCode( $bookingInfo->Customer->Zip ); |
@@ -214,17 +214,17 @@ discard block |
||
214 | 214 | |
215 | 215 | $zipPreset = WebPayItem::presetValue() |
216 | 216 | ->setTypeName( \Svea\WebPay\Checkout\Model\PresetValue::POSTAL_CODE ) |
217 | - ->setValue( ! empty( $bookingInfo->Customer->InvoiceZip ) ? $bookingInfo->Customer->InvoiceZip : $bookingInfo->Customer->Zip ) |
|
217 | + ->setValue( !empty( $bookingInfo->Customer->InvoiceZip ) ? $bookingInfo->Customer->InvoiceZip : $bookingInfo->Customer->Zip ) |
|
218 | 218 | ->setIsReadonly( false ); |
219 | 219 | $wpOrder->addPresetValue( $zipPreset ); |
220 | 220 | |
221 | - if ( ! empty( $bookingInfo->Customer->InvoiceCity ) ) { |
|
221 | + if ( !empty( $bookingInfo->Customer->InvoiceCity ) ) { |
|
222 | 222 | $customer->setLocality( $bookingInfo->Customer->InvoiceCity ); |
223 | 223 | } else { |
224 | 224 | $customer->setLocality( $bookingInfo->Customer->City ); |
225 | 225 | } |
226 | 226 | |
227 | - if ( ! empty( $bookingInfo->Customer->Phone ) ) { |
|
227 | + if ( !empty( $bookingInfo->Customer->Phone ) ) { |
|
228 | 228 | $customer->setPhoneNumber( $bookingInfo->Customer->Phone ); |
229 | 229 | $phonePreset = WebPayItem::presetValue() |
230 | 230 | ->setTypeName( \Svea\WebPay\Checkout\Model\PresetValue::PHONE_NUMBER ) |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $wpOrder->addPresetValue( $phonePreset ); |
234 | 234 | } |
235 | 235 | |
236 | - if ( ! empty( $bookingInfo->Customer->InvoiceEmail ) ) { |
|
236 | + if ( !empty( $bookingInfo->Customer->InvoiceEmail ) ) { |
|
237 | 237 | $customer->setEmail( $bookingInfo->Customer->InvoiceEmail ); |
238 | 238 | } else { |
239 | 239 | $customer->setEmail( $bookingInfo->Customer->Email ); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | |
242 | 242 | $emailPreset = WebPayItem::presetValue() |
243 | 243 | ->setTypeName( \Svea\WebPay\Checkout\Model\PresetValue::EMAIL_ADDRESS ) |
244 | - ->setValue( ! empty( $bookingInfo->Customer->InvoiceEmail ) ? $bookingInfo->Customer->InvoiceEmail : $bookingInfo->Customer->Email ) |
|
244 | + ->setValue( !empty( $bookingInfo->Customer->InvoiceEmail ) ? $bookingInfo->Customer->InvoiceEmail : $bookingInfo->Customer->Email ) |
|
245 | 245 | ->setIsReadonly( false ); |
246 | 246 | $wpOrder->addPresetValue( $emailPreset ); |
247 | 247 |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * |
107 | 107 | * @return string |
108 | 108 | */ |
109 | - public function getCheckoutMerchantId($country = NULL) { |
|
109 | + public function getCheckoutMerchantId( $country = NULL ) { |
|
110 | 110 | $merchantId = $this->plugin->get_option( 'merchant_key', '' ); |
111 | 111 | |
112 | 112 | return $merchantId; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * |
118 | 118 | * @return string |
119 | 119 | */ |
120 | - public function getCheckoutSecret($country = NULL) { |
|
120 | + public function getCheckoutSecret( $country = NULL ) { |
|
121 | 121 | $secret = $this->plugin->get_option( 'merchant_secret', '' ); |
122 | 122 | |
123 | 123 | return $secret; |