Merge pull request #5815 from beganovich/v5-2505-acceptance

(v5) 25th May: Acceptance
This commit is contained in:
Benjamin Beganović 2021-05-25 18:33:49 +02:00 committed by GitHub
commit 20d105dbaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 24 deletions

View File

@ -189,7 +189,7 @@ class StripePaymentDriver extends BaseDriver
if ($this->company_gateway->require_billing_address) { if ($this->company_gateway->require_billing_address) {
$fields[] = ['name' => 'client_address_line_1', 'label' => ctrans('texts.address1'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_address_line_1', 'label' => ctrans('texts.address1'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_address_line_2', 'label' => ctrans('texts.address2'), 'type' => 'text', 'validation' => 'sometimes']; // $fields[] = ['name' => 'client_address_line_2', 'label' => ctrans('texts.address2'), 'type' => 'text', 'validation' => 'nullable'];
$fields[] = ['name' => 'client_city', 'label' => ctrans('texts.city'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_city', 'label' => ctrans('texts.city'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_state', 'label' => ctrans('texts.state'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_state', 'label' => ctrans('texts.state'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_country_id', 'label' => ctrans('texts.country'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_country_id', 'label' => ctrans('texts.country'), 'type' => 'text', 'validation' => 'required'];
@ -197,7 +197,7 @@ class StripePaymentDriver extends BaseDriver
if ($this->company_gateway->require_shipping_address) { if ($this->company_gateway->require_shipping_address) {
$fields[] = ['name' => 'client_shipping_address_line_1', 'label' => ctrans('texts.shipping_address1'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_shipping_address_line_1', 'label' => ctrans('texts.shipping_address1'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_shipping_address_line_2', 'label' => ctrans('texts.shipping_address2'), 'type' => 'text', 'validation' => 'sometimes']; // $fields[] = ['name' => 'client_shipping_address_line_2', 'label' => ctrans('texts.shipping_address2'), 'type' => 'text', 'validation' => 'sometimes'];
$fields[] = ['name' => 'client_shipping_city', 'label' => ctrans('texts.shipping_city'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_shipping_city', 'label' => ctrans('texts.shipping_city'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_shipping_state', 'label' => ctrans('texts.shipping_state'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_shipping_state', 'label' => ctrans('texts.shipping_state'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_shipping_postal_code', 'label' => ctrans('texts.shipping_postal_code'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_shipping_postal_code', 'label' => ctrans('texts.shipping_postal_code'), 'type' => 'text', 'validation' => 'required'];
@ -255,7 +255,7 @@ class StripePaymentDriver extends BaseDriver
public function createPaymentIntent($data): ?PaymentIntent public function createPaymentIntent($data): ?PaymentIntent
{ {
$this->init(); $this->init();
$meta = $this->stripe_connect_auth; $meta = $this->stripe_connect_auth;
return PaymentIntent::create($data, $meta); return PaymentIntent::create($data, $meta);
@ -299,7 +299,7 @@ class StripePaymentDriver extends BaseDriver
$customer = null; $customer = null;
$this->init(); $this->init();
$client_gateway_token = ClientGatewayToken::whereClientId($this->client->id)->whereCompanyGatewayId($this->company_gateway->id)->first(); $client_gateway_token = ClientGatewayToken::whereClientId($this->client->id)->whereCompanyGatewayId($this->company_gateway->id)->first();
if ($client_gateway_token && $client_gateway_token->gateway_customer_reference) { if ($client_gateway_token && $client_gateway_token->gateway_customer_reference) {
@ -420,12 +420,12 @@ class StripePaymentDriver extends BaseDriver
nlog($e->getMessage()); nlog($e->getMessage());
SystemLogger::dispatch([ SystemLogger::dispatch([
'server_response' => $e->getMessage(), 'server_response' => $e->getMessage(),
'data' => request()->all(), 'data' => request()->all(),
], ],
SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::EVENT_GATEWAY_FAILURE,
SystemLog::TYPE_STRIPE, SystemLog::TYPE_STRIPE,
$this->client, $this->client->company); $this->client, $this->client->company);
} }
@ -444,7 +444,7 @@ class StripePaymentDriver extends BaseDriver
$this->init(); $this->init();
try{ try{
$pm = $this->getStripePaymentMethod($token->token); $pm = $this->getStripePaymentMethod($token->token);
$pm->detach([], $this->stripe_connect_auth); $pm->detach([], $this->stripe_connect_auth);
@ -453,12 +453,12 @@ class StripePaymentDriver extends BaseDriver
nlog($e->getMessage()); nlog($e->getMessage());
SystemLogger::dispatch([ SystemLogger::dispatch([
'server_response' => $e->getMessage(), 'server_response' => $e->getMessage(),
'data' => request()->all(), 'data' => request()->all(),
], ],
SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::EVENT_GATEWAY_FAILURE,
SystemLog::TYPE_STRIPE, SystemLog::TYPE_STRIPE,
$this->client, $this->client->company); $this->client, $this->client->company);
} }
@ -499,7 +499,7 @@ class StripePaymentDriver extends BaseDriver
/** /**
* Pull all client payment methods and update * Pull all client payment methods and update
* the respective tokens in the system. * the respective tokens in the system.
* *
*/ */
// public function updateAllPaymentMethods() // public function updateAllPaymentMethods()
// { // {
@ -508,9 +508,9 @@ class StripePaymentDriver extends BaseDriver
/** /**
* Imports stripe customers and their payment methods * Imports stripe customers and their payment methods
* Matches users in the system based on the $match_on_record * Matches users in the system based on the $match_on_record
* ie. email * ie. email
* *
* Phone * Phone
* Email * Email
*/ */

View File

@ -45,13 +45,13 @@
</span> </span>
</th> </th>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-white uppercase border-b border-gray-200 bg-primary"> <th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-white uppercase border-b border-gray-200 bg-primary">
<span role="button" wire:click="sortBy('balance')" class="cursor-pointer"> <span role="button" wire:click="sortBy('amount')" class="cursor-pointer">
{{ ctrans('texts.balance') }} {{ ctrans('texts.amount') }}
</span> </span>
</th> </th>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-white uppercase border-b border-gray-200 bg-primary"> <th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-white uppercase border-b border-gray-200 bg-primary">
<span role="button" wire:click="sortBy('amount')" class="cursor-pointer"> <span role="button" wire:click="sortBy('balance')" class="cursor-pointer">
{{ ctrans('texts.amount') }} {{ ctrans('texts.balance') }}
</span> </span>
</th> </th>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-white uppercase border-b border-gray-200 bg-primary"> <th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-white uppercase border-b border-gray-200 bg-primary">
@ -82,10 +82,10 @@
{{ $invoice->formatDate($invoice->date, $invoice->client->date_format()) }} {{ $invoice->formatDate($invoice->date, $invoice->client->date_format()) }}
</td> </td>
<td class="px-6 py-4 text-sm leading-5 text-gray-500 whitespace-no-wrap"> <td class="px-6 py-4 text-sm leading-5 text-gray-500 whitespace-no-wrap">
{{ App\Utils\Number::formatMoney($invoice->balance, $invoice->client) }} {{ App\Utils\Number::formatMoney($invoice->amount, $invoice->client) }}
</td> </td>
<td class="px-6 py-4 text-sm leading-5 text-gray-500 whitespace-no-wrap"> <td class="px-6 py-4 text-sm leading-5 text-gray-500 whitespace-no-wrap">
{{ App\Utils\Number::formatMoney($invoice->amount, $invoice->client) }} {{ App\Utils\Number::formatMoney($invoice->balance, $invoice->client) }}
</td> </td>
<td class="px-6 py-4 text-sm leading-5 text-gray-500 whitespace-no-wrap"> <td class="px-6 py-4 text-sm leading-5 text-gray-500 whitespace-no-wrap">
{{ $invoice->formatDate($invoice->due_date, $invoice->client->date_format()) }} {{ $invoice->formatDate($invoice->due_date, $invoice->client->date_format()) }}