Merge pull request #7226 from turbo124/v5-develop

v5.3.61
This commit is contained in:
David Bomba 2022-02-21 15:32:31 +11:00 committed by GitHub
commit e627e2d307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 15 deletions

View File

@ -70,6 +70,12 @@ class CreditCard
'sequenceType' => 'recurring',
'description' => \sprintf('Hash: %s', $this->mollie->payment_hash->hash),
'webhookUrl' => $this->mollie->company_gateway->webhookUrl(),
'metadata' => [
'client_id' => $this->mollie->client->hashed_id,
'hash' => $this->mollie->payment_hash->hash,
'gateway_type_id' => GatewayType::CREDIT_CARD,
'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
],
]);
if ($payment->status === 'paid') {
@ -106,6 +112,12 @@ class CreditCard
'hash' => $this->mollie->payment_hash->hash,
]),
'webhookUrl' => $this->mollie->company_gateway->webhookUrl(),
'metadata' => [
'client_id' => $this->mollie->client->hashed_id,
'hash' => $this->mollie->payment_hash->hash,
'gateway_type_id' => GatewayType::CREDIT_CARD,
'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
],
'cardToken' => $request->gateway_response,
];

View File

@ -17,6 +17,7 @@ use Coconuts\Mail\PostmarkTransport;
use GuzzleHttp\Client as HttpClient;
use Illuminate\Mail\MailServiceProvider as MailProvider;
use Illuminate\Mail\TransportManager;
use Illuminate\Container\Container;
class MailServiceProvider extends MailProvider
{
@ -33,11 +34,17 @@ class MailServiceProvider extends MailProvider
protected function registerIlluminateMailer()
{
// //this is not octane safe
$this->app->singleton('mail.manager', function($app) {
return new GmailTransportManager($app);
});
//this is octane ready - but is untested
// $this->app->bind('mail.manager', function ($app){
// return new GmailTransportManager($app);
// });
$this->app->bind('mailer', function ($app) {
return $app->make('mail.manager')->mailer();
});

View File

@ -33,6 +33,7 @@ class NinjaTranslationServiceProvider extends TranslationServiceProvider
*
*/
//this is not octane safe
$this->app->singleton('translator', function ($app) {
$loader = $app['translation.loader'];

View File

@ -70,16 +70,16 @@ class PaymentMethod
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
$this->gateways =
CompanyGateway::with('gateway')
->where('company_id', $this->client->company_id)
$this->gateways = $this->client
->company
->company_gateways
->whereIn('id', $transformed_ids)
->where('is_deleted', false)
->whereNull('deleted_at')
->where('gateway_key', '!=', '54faab2ab6e3223dbe848b1686490baa')
->sortby(function ($model) use ($transformed_ids) { //company gateways are sorted in order of priority
return array_search($model->id, $transformed_ids);// this closure sorts for us
})->get();
});
} else {
@ -105,15 +105,16 @@ class PaymentMethod
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
$this->gateways = CompanyGateway::with('gateway')
->where('company_id', $this->client->company_id)
$this->gateways = $this->client
->company
->company_gateways
->whereIn('id', $transformed_ids)
->where('is_deleted', false)
->whereNull('deleted_at')
->where('gateway_key', '54faab2ab6e3223dbe848b1686490baa')
->sortby(function ($model) use ($transformed_ids) { //company gateways are sorted in order of priority
return array_search($model->id, $transformed_ids);// this closure sorts for us
})->get();
});
} else {

View File

@ -262,9 +262,11 @@ class Helpers
}
}
$x = str_replace(["\n", "<br>"], ["\r", "<br>"], $value);
return $value;
return $x;
// $x = str_replace(["\n", "<br>"], ["\r", "<br>"], $value);
// return $x;
}
/**

View File

@ -164,6 +164,8 @@ class SystemHealth
private static function extensions(): array
{
$loaded_extensions = null;
$loaded_extensions = [];
foreach (self::$extensions as $extension) {

View File

@ -26,7 +26,7 @@
@elseif(isset($company) && !is_null($company))
<div>
<img src="{{ $company->present()->logo() }}"
class="border-b border-gray-100 h-18 pb-4" alt="{{ $company->present()->name() }} logo">
class="mx-auto border-b border-gray-100 h-18 pb-4" alt="{{ $company->present()->name() }} logo">
</div>
@endif

View File

@ -78,7 +78,7 @@
{{ ctrans('texts.due_date') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $invoice->due_date }}
{{ $invoice->translateDate($invoice->due_date, $invoice->client->date_format(), $invoice->client->locale()) }}
</dd>
</div>
@endif

View File

@ -41,7 +41,7 @@ Route::group(['middleware' => ['url_db']], function () {
Route::get('stripe/signup/{token}', 'StripeConnectController@initialize')->name('stripe_connect.initialization');
Route::get('stripe/completed', 'StripeConnectController@completed')->name('stripe_connect.return');
Route::get('checkout/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Checkout3dsController@index')->name('checkout.3ds_redirect');
Route::get('mollie/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Mollie3dsController@index')->name('mollie.3ds_redirect');
Route::get('gocardless/ibp_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\GoCardlessController@ibpRedirect')->name('gocardless.ibp_redirect');
Route::get('checkout/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Checkout3dsController@index')->middleware('domain_db')->name('checkout.3ds_redirect');
Route::get('mollie/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Mollie3dsController@index')->middleware('domain_db')->name('mollie.3ds_redirect');
Route::get('gocardless/ibp_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\GoCardlessController@ibpRedirect')->middleware('domain_db')->name('gocardless.ibp_redirect');
Route::get('.well-known/apple-developer-merchantid-domain-association', 'ClientPortal\ApplePayDomainController@showAppleMerchantId');