mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Make square postal code optional
This commit is contained in:
parent
4294cf425f
commit
b688a432ab
@ -68,7 +68,6 @@ class CreditCard implements MethodInterface
|
||||
$data['amount'] = $this->square_driver->payment_hash->data->amount_with_fee;
|
||||
$data['currencyCode'] = $this->square_driver->client->getCurrencyCode();
|
||||
$data['square_contact'] = $this->buildClientObject();
|
||||
$data['postal_code_required'] = in_array($data['currencyCode'], ['USD', 'GBP', 'CAD']) || $this->square_driver->company_gateway->getConfigField('testMode');
|
||||
|
||||
return render('gateways.square.credit_card.pay', $data);
|
||||
}
|
||||
|
@ -195,7 +195,6 @@ class SquarePaymentDriver extends BaseDriver
|
||||
{
|
||||
$fields = [];
|
||||
|
||||
|
||||
if ($this->company_gateway->require_client_name) {
|
||||
$fields[] = ['name' => 'client_name', 'label' => ctrans('texts.client_name'), 'type' => 'text', 'validation' => 'required'];
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ class SquareCreditCard {
|
||||
currencyCode: document.querySelector('meta[name=currencyCode]')
|
||||
.content,
|
||||
intent: 'CHARGE',
|
||||
postalCode: document.querySelector('meta[name=postal_code_required]').content
|
||||
};
|
||||
|
||||
const verificationResults = await this.payments.verifyBuyer(
|
||||
@ -115,8 +114,6 @@ class SquareCreditCard {
|
||||
currencyCode: document.querySelector('meta[name=currencyCode]')
|
||||
.content,
|
||||
intent: 'CHARGE',
|
||||
postalCode: document.querySelector('meta[name=postal_code_required]').content
|
||||
|
||||
};
|
||||
|
||||
const verificationResults = await this.payments.verifyBuyer(
|
||||
|
@ -7,7 +7,6 @@
|
||||
<meta name="square_contact" content="{{ json_encode($square_contact) }}">
|
||||
<meta name="amount" content="{{ $amount }}">
|
||||
<meta name="currencyCode" content="{{ $currencyCode }}">
|
||||
<meta name="postal_code_required" content="{{ (bool)$postal_code_required ? true : false}}">
|
||||
|
||||
@endsection
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user