mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
f29bdcbb8d
@ -1 +1 @@
|
|||||||
5.5.119
|
5.5.120
|
@ -124,15 +124,16 @@ class TaskStatusController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function update(UpdateTaskStatusRequest $request, TaskStatus $task_status)
|
public function update(UpdateTaskStatusRequest $request, TaskStatus $task_status)
|
||||||
{
|
{
|
||||||
|
|
||||||
$task_status->fill($request->all());
|
$task_status->fill($request->all());
|
||||||
$reorder = $task_status->isDirty('status_order');
|
$reorder = $task_status->isDirty('status_order');
|
||||||
$task_status->save();
|
$task_status->save();
|
||||||
|
|
||||||
if ($reorder)
|
if ($reorder)
|
||||||
$this->task_status_repo->reorder($task_status);
|
$this->task_status_repo->reorder($task_status);
|
||||||
|
|
||||||
return $this->itemResponse($task_status->fresh());
|
return $this->itemResponse($task_status->fresh());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,12 +106,12 @@ class UpdateOrCreateProduct implements ShouldQueue
|
|||||||
$product->quantity = isset($item->quantity) ? $item->quantity : 0;
|
$product->quantity = isset($item->quantity) ? $item->quantity : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$product->tax_name1 = isset($item->tax_name1) ? $item->tax_name1 : '';
|
// $product->tax_name1 = isset($item->tax_name1) ? $item->tax_name1 : '';
|
||||||
$product->tax_rate1 = isset($item->tax_rate1) ? $item->tax_rate1 : 0;
|
// $product->tax_rate1 = isset($item->tax_rate1) ? $item->tax_rate1 : 0;
|
||||||
$product->tax_name2 = isset($item->tax_name2) ? $item->tax_name2 : '';
|
// $product->tax_name2 = isset($item->tax_name2) ? $item->tax_name2 : '';
|
||||||
$product->tax_rate2 = isset($item->tax_rate2) ? $item->tax_rate2 : 0;
|
// $product->tax_rate2 = isset($item->tax_rate2) ? $item->tax_rate2 : 0;
|
||||||
$product->tax_name3 = isset($item->tax_name3) ? $item->tax_name3 : '';
|
// $product->tax_name3 = isset($item->tax_name3) ? $item->tax_name3 : '';
|
||||||
$product->tax_rate3 = isset($item->tax_rate3) ? $item->tax_rate3 : 0;
|
// $product->tax_rate3 = isset($item->tax_rate3) ? $item->tax_rate3 : 0;
|
||||||
|
|
||||||
if (isset($item->custom_value1) && strlen($item->custom_value1) >=1) {
|
if (isset($item->custom_value1) && strlen($item->custom_value1) >=1) {
|
||||||
$product->custom_value1 = $item->custom_value1;
|
$product->custom_value1 = $item->custom_value1;
|
||||||
|
@ -11,18 +11,19 @@
|
|||||||
|
|
||||||
namespace App\PaymentDrivers;
|
namespace App\PaymentDrivers;
|
||||||
|
|
||||||
use App\Exceptions\SystemError;
|
use App\Models\Invoice;
|
||||||
use App\Http\Requests\Payments\PaymentWebhookRequest;
|
|
||||||
use App\Jobs\Util\SystemLogger;
|
|
||||||
use App\Models\ClientGatewayToken;
|
|
||||||
use App\Models\GatewayType;
|
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
|
use App\Utils\CurlUtils;
|
||||||
|
use App\Models\SystemLog;
|
||||||
|
use App\Models\GatewayType;
|
||||||
use App\Models\PaymentHash;
|
use App\Models\PaymentHash;
|
||||||
use App\Models\PaymentType;
|
use App\Models\PaymentType;
|
||||||
use App\Models\SystemLog;
|
use App\Exceptions\SystemError;
|
||||||
use App\PaymentDrivers\PayTrace\CreditCard;
|
use App\Jobs\Util\SystemLogger;
|
||||||
use App\Utils\CurlUtils;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Models\ClientGatewayToken;
|
||||||
|
use App\PaymentDrivers\PayTrace\CreditCard;
|
||||||
|
use App\Http\Requests\Payments\PaymentWebhookRequest;
|
||||||
|
|
||||||
class PaytracePaymentDriver extends BaseDriver
|
class PaytracePaymentDriver extends BaseDriver
|
||||||
{
|
{
|
||||||
@ -125,10 +126,20 @@ class PaytracePaymentDriver extends BaseDriver
|
|||||||
{
|
{
|
||||||
$amount = array_sum(array_column($payment_hash->invoices(), 'amount')) + $payment_hash->fee_total;
|
$amount = array_sum(array_column($payment_hash->invoices(), 'amount')) + $payment_hash->fee_total;
|
||||||
|
|
||||||
|
$_invoice = collect($payment_hash->data->invoices)->first();
|
||||||
|
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
|
||||||
|
|
||||||
|
if ($invoice) {
|
||||||
|
$invoice_id = ctrans('texts.invoice_number').'# '.$invoice->number;
|
||||||
|
}
|
||||||
|
|
||||||
|
$invoice_id = ctrans('texts.invoice_number').'# '.substr($payment_hash->hash, 0, 6);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'customer_id' => $cgt->token,
|
'customer_id' => $cgt->token,
|
||||||
'integrator_id' => $this->company_gateway->getConfigField('integratorId'),
|
'integrator_id' => $this->company_gateway->getConfigField('integratorId'),
|
||||||
'amount' => $amount,
|
'amount' => $amount,
|
||||||
|
'invoice_id' => $invoice_id,
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->gatewayRequest('/v1/transactions/sale/by_customer', $data);
|
$response = $this->gatewayRequest('/v1/transactions/sale/by_customer', $data);
|
||||||
@ -173,7 +184,10 @@ class PaytracePaymentDriver extends BaseDriver
|
|||||||
/*Helpers*/
|
/*Helpers*/
|
||||||
private function generateAuthHeaders()
|
private function generateAuthHeaders()
|
||||||
{
|
{
|
||||||
$url = 'https://api.paytrace.com/oauth/token';
|
$api_endpoint = $this->company_gateway->getConfigField('testMode') ? 'https://api.sandbox.paytrace.com' : 'https://api.paytrace.com';
|
||||||
|
|
||||||
|
$url = "{$api_endpoint}/oauth/token";
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'grant_type' => 'password',
|
'grant_type' => 'password',
|
||||||
'username' => $this->company_gateway->getConfigField('username'),
|
'username' => $this->company_gateway->getConfigField('username'),
|
||||||
@ -197,9 +211,12 @@ class PaytracePaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
public function getAuthToken()
|
public function getAuthToken()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$api_endpoint = $this->company_gateway->getConfigField('testMode') ? 'https://api.sandbox.paytrace.com' : 'https://api.paytrace.com';
|
||||||
|
|
||||||
$headers = $this->generateAuthHeaders();
|
$headers = $this->generateAuthHeaders();
|
||||||
|
|
||||||
$response = CurlUtils::post('https://api.paytrace.com/v1/payment_fields/token/create', [], $headers);
|
$response = CurlUtils::post("{$api_endpoint}/v1/payment_fields/token/create", [], $headers);
|
||||||
|
|
||||||
$response = json_decode($response);
|
$response = json_decode($response);
|
||||||
|
|
||||||
@ -212,7 +229,10 @@ class PaytracePaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
public function gatewayRequest($uri, $data, $headers = false)
|
public function gatewayRequest($uri, $data, $headers = false)
|
||||||
{
|
{
|
||||||
$base_url = "https://api.paytrace.com{$uri}";
|
|
||||||
|
$api_endpoint = $this->company_gateway->getConfigField('testMode') ? 'https://api.sandbox.paytrace.com' : 'https://api.paytrace.com';
|
||||||
|
|
||||||
|
$base_url = "{$api_endpoint}{$uri}";
|
||||||
|
|
||||||
$headers = $this->generateAuthHeaders();
|
$headers = $this->generateAuthHeaders();
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
'amount' => $this->convertToStripeAmount($amount, $this->client->currency()->precision, $this->client->currency()),
|
'amount' => $this->convertToStripeAmount($amount, $this->client->currency()->precision, $this->client->currency()),
|
||||||
], $meta);
|
], $meta);
|
||||||
|
|
||||||
if ($response->status == $response::STATUS_SUCCEEDED) {
|
if (in_array($response->status, [$response::STATUS_SUCCEEDED, 'pending'])) {
|
||||||
SystemLogger::dispatch(['server_response' => $response, 'data' => request()->all()], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_STRIPE, $this->client, $this->client->company);
|
SystemLogger::dispatch(['server_response' => $response, 'data' => request()->all()], SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_STRIPE, $this->client, $this->client->company);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@ -712,6 +712,11 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($payment) {
|
if ($payment) {
|
||||||
|
|
||||||
|
if(isset($transaction['payment_method_details']['au_becs_debit'])) {
|
||||||
|
$payment->transaction_reference = $transaction['id'];
|
||||||
|
}
|
||||||
|
|
||||||
$payment->status_id = Payment::STATUS_COMPLETED;
|
$payment->status_id = Payment::STATUS_COMPLETED;
|
||||||
$payment->save();
|
$payment->save();
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,8 @@ class TaskStatusRepository extends BaseRepository
|
|||||||
$new_status = $task_status ? $task_status->id : null;
|
$new_status = $task_status ? $task_status->id : null;
|
||||||
|
|
||||||
Task::where('status_id', $task_status->id)
|
Task::where('status_id', $task_status->id)
|
||||||
->where('company_id', $task_status->company_id)
|
->where('company_id', $task_status->company_id)
|
||||||
->update(['status_id' => $new_status]);
|
->update(['status_id' => $new_status]);
|
||||||
|
|
||||||
|
|
||||||
parent::archive($task_status);
|
parent::archive($task_status);
|
||||||
@ -57,14 +57,30 @@ class TaskStatusRepository extends BaseRepository
|
|||||||
public function reorder(TaskStatus $task_status)
|
public function reorder(TaskStatus $task_status)
|
||||||
{
|
{
|
||||||
|
|
||||||
TaskStatus::query()
|
TaskStatus::where('company_id', $task_status->company_id)
|
||||||
->where('company_id', $task_status->company_id)
|
->where('id', '!=', $task_status->id)
|
||||||
->orderByRaw('ISNULL(status_order), status_order ASC')
|
->orderByRaw('ISNULL(status_order), status_order ASC')
|
||||||
->orderBy('updated_at', 'DESC')
|
->cursor()
|
||||||
->cursor()
|
->each(function ($ts, $key) use($task_status){
|
||||||
->each(function ($task_status, $index) {
|
|
||||||
$task_status->update(['status_order' => $index+1]);
|
if($ts->status_order < $task_status->status_order) {
|
||||||
});
|
$ts->status_order--;
|
||||||
|
$ts->save();
|
||||||
|
} elseif($ts->status_order >= $task_status->status_order) {
|
||||||
|
$ts->status_order ++;
|
||||||
|
$ts->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
TaskStatus::where('company_id', $task_status->company_id)
|
||||||
|
->orderByRaw('ISNULL(status_order), status_order ASC')
|
||||||
|
->cursor()
|
||||||
|
->each(function ($ts, $key) {
|
||||||
|
$ts->status_order = $key+1;
|
||||||
|
$ts->save();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,14 +168,10 @@ class EmailDefaults
|
|||||||
*/
|
*/
|
||||||
private function setBody(): self
|
private function setBody(): self
|
||||||
{
|
{
|
||||||
if ($this->template == 'email.template.custom') {
|
|
||||||
$this->email->email_object->body = (str_replace('$body', $this->email->email_object->body, $this->email->email_object->settings->email_style_custom));
|
if (strlen($this->email->email_object->body) > 3) {
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->email->email_object->body) {
|
|
||||||
// A Custom Message has been set in the email screen.
|
// A Custom Message has been set in the email screen.
|
||||||
return $this;
|
// return $this;
|
||||||
} elseif (strlen($this->email->email_object->settings?->{$this->email->email_object->email_template_body}) > 3) {
|
} elseif (strlen($this->email->email_object->settings?->{$this->email->email_object->email_template_body}) > 3) {
|
||||||
// A body has been saved in the settings.
|
// A body has been saved in the settings.
|
||||||
$this->email->email_object->body = $this->email->email_object->settings?->{$this->email->email_object->email_template_body};
|
$this->email->email_object->body = $this->email->email_object->settings?->{$this->email->email_object->email_template_body};
|
||||||
@ -183,7 +179,13 @@ class EmailDefaults
|
|||||||
// Default template to be used
|
// Default template to be used
|
||||||
$this->email->email_object->body = EmailTemplateDefaults::getDefaultTemplate($this->email->email_object->email_template_body, $this->locale);
|
$this->email->email_object->body = EmailTemplateDefaults::getDefaultTemplate($this->email->email_object->email_template_body, $this->locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->template == 'email.template.custom') {
|
||||||
|
$this->email->email_object->body = (str_replace('$body', $this->email->email_object->body, str_replace(["\r","\n"], "", $this->email->email_object->settings->email_style_custom)));
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,6 +91,7 @@ class RecurringInvoiceTransformer extends EntityTransformer
|
|||||||
'date' => $invoice->date ?: '',
|
'date' => $invoice->date ?: '',
|
||||||
'last_sent_date' => $invoice->last_sent_date ?: '',
|
'last_sent_date' => $invoice->last_sent_date ?: '',
|
||||||
'next_send_date' => $invoice->next_send_date_client ?: '',
|
'next_send_date' => $invoice->next_send_date_client ?: '',
|
||||||
|
'next_send_datetime' => $invoice->next_send_date ?: '',
|
||||||
'due_date' => $invoice->due_date ?: '',
|
'due_date' => $invoice->due_date ?: '',
|
||||||
'terms' => $invoice->terms ?: '',
|
'terms' => $invoice->terms ?: '',
|
||||||
'public_notes' => $invoice->public_notes ?: '',
|
'public_notes' => $invoice->public_notes ?: '',
|
||||||
|
@ -114,7 +114,8 @@ class HtmlEngine
|
|||||||
$data['$company_logo_size'] = ['value' => $this->resolveCompanyLogoSize(), 'label' => ''];
|
$data['$company_logo_size'] = ['value' => $this->resolveCompanyLogoSize(), 'label' => ''];
|
||||||
$data['$show_shipping_address'] = ['value' => $this->settings?->show_shipping_address ? 'flex' : 'none', 'label' => ''];
|
$data['$show_shipping_address'] = ['value' => $this->settings?->show_shipping_address ? 'flex' : 'none', 'label' => ''];
|
||||||
$data['$show_shipping_address_block'] = ['value' => $this->settings?->show_shipping_address ? 'block' : 'none', 'label' => ''];
|
$data['$show_shipping_address_block'] = ['value' => $this->settings?->show_shipping_address ? 'block' : 'none', 'label' => ''];
|
||||||
$data['$show_shipping_address_visibility'] = ['value' => $this->settings?->show_shipping_address ? 'visible' : 'hidden', 'label' => ''];
|
// $data['$show_shipping_address_visibility'] = ['value' => $this->settings?->show_shipping_address ? 'visible' : 'hidden', 'label' => ''];
|
||||||
|
$data['$show_shipping_address_visibility'] = ['value' => $this->settings?->show_shipping_address ? 1 : 0, 'label' => ''];
|
||||||
|
|
||||||
$data['$tax'] = ['value' => '', 'label' => ctrans('texts.tax')];
|
$data['$tax'] = ['value' => '', 'label' => ctrans('texts.tax')];
|
||||||
$data['$app_url'] = ['value' => $this->generateAppUrl(), 'label' => ''];
|
$data['$app_url'] = ['value' => $this->generateAppUrl(), 'label' => ''];
|
||||||
|
@ -76,7 +76,7 @@ trait CleanLineItems
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists('id', $item)) {
|
if (array_key_exists('id', $item) || array_key_exists('_id', $item)) {
|
||||||
unset($item['id']);
|
unset($item['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => '5.5.119',
|
'app_version' => '5.5.120',
|
||||||
'app_tag' => '5.5.119',
|
'app_tag' => '5.5.120',
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', ''),
|
'api_secret' => env('API_SECRET', ''),
|
||||||
|
@ -20,6 +20,8 @@ return new class extends Migration
|
|||||||
$table->text('origin_tax_data')->nullable();
|
$table->text('origin_tax_data')->nullable();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
\Illuminate\Support\Facades\Artisan::call('ninja:design-update');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,46 +28,82 @@ var PayTraceCreditCard = /*#__PURE__*/function () {
|
|||||||
key: "creditCardStyles",
|
key: "creditCardStyles",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return {
|
return {
|
||||||
font_color: '#111827',
|
'font_color': '#000',
|
||||||
border_color: 'rgba(210,214,220,1)',
|
'border_color': '#a1b1c9',
|
||||||
label_color: '#111827',
|
'border_style': 'dotted',
|
||||||
label_size: '12pt',
|
'font_size': '13pt',
|
||||||
background_color: 'white',
|
'input_border_radius': '3px',
|
||||||
border_style: 'solid',
|
'input_border_width': '1px',
|
||||||
font_size: '15pt',
|
'input_font': 'Times New Roman, arial, fantasy',
|
||||||
height: '30px',
|
'input_font_weight': '400',
|
||||||
width: '100%'
|
'input_margin': '5px 0px 5px 0px',
|
||||||
|
'input_padding': '0px 5px 0px 5px',
|
||||||
|
'label_color': '#a0aec0',
|
||||||
|
'label_size': '16px',
|
||||||
|
'label_width': '150px',
|
||||||
|
'label_font': 'Times New Roman, sans-serif, serif',
|
||||||
|
'label_font_weight': 'light',
|
||||||
|
'label_margin': '5px 0px 0px 0px',
|
||||||
|
'label_padding': '0px 5px 0px 5px',
|
||||||
|
'background_color': 'white',
|
||||||
|
'height': '30px',
|
||||||
|
'width': '370px',
|
||||||
|
'padding_bottom': '0px'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: "codeStyles",
|
key: "codeStyles",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return {
|
return {
|
||||||
font_color: '#111827',
|
'font_color': '#000',
|
||||||
border_color: 'rgba(210,214,220,1)',
|
'border_color': '#a1b1c9',
|
||||||
label_color: '#111827',
|
'border_style': 'dotted',
|
||||||
label_size: '12pt',
|
'font_size': '13pt',
|
||||||
background_color: 'white',
|
'input_border_radius': '2px',
|
||||||
border_style: 'solid',
|
'input_border_width': '1px',
|
||||||
font_size: '15pt',
|
'input_font': 'serif, cursive, fantasy',
|
||||||
height: '30px',
|
'input_font_weight': '700',
|
||||||
width: '300px'
|
'input_margin': '5px 0px 5px 20px',
|
||||||
|
'input_padding': '0px 5px 0px 5px',
|
||||||
|
'label_color': '#a0aec0',
|
||||||
|
'label_size': '16px',
|
||||||
|
'label_width': '150px',
|
||||||
|
'label_font': 'sans-serif, arial, serif',
|
||||||
|
'label_font_weight': 'bold',
|
||||||
|
'label_margin': '5px 0px 0px 20px',
|
||||||
|
'label_padding': '2px 5px 2px 5px',
|
||||||
|
'background_color': 'white',
|
||||||
|
'height': '30px',
|
||||||
|
'width': '150px',
|
||||||
|
'padding_bottom': '2px'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: "expStyles",
|
key: "expStyles",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return {
|
return {
|
||||||
font_color: '#111827',
|
'font_color': '#000',
|
||||||
border_color: 'rgba(210,214,220,1)',
|
'border_color': '#a1b1c9',
|
||||||
label_color: '#111827',
|
'border_style': 'dashed',
|
||||||
label_size: '12pt',
|
'font_size': '12pt',
|
||||||
background_color: 'white',
|
'input_border_radius': '0px',
|
||||||
border_style: 'solid',
|
'input_border_width': '2px',
|
||||||
font_size: '15pt',
|
'input_font': 'arial, cursive, fantasy',
|
||||||
height: '30px',
|
'input_font_weight': '400',
|
||||||
width: '85px',
|
'input_margin': '5px 0px 5px 0px',
|
||||||
type: 'dropdown'
|
'input_padding': '0px 5px 0px 5px',
|
||||||
|
'label_color': '#a0aec0',
|
||||||
|
'label_size': '16px',
|
||||||
|
'label_width': '150px',
|
||||||
|
'label_font': 'arial, fantasy, serif',
|
||||||
|
'label_font_weight': 'normal',
|
||||||
|
'label_margin': '5px 0px 0px 0px',
|
||||||
|
'label_padding': '2px 5px 2px 5px',
|
||||||
|
'background_color': 'white',
|
||||||
|
'height': '30px',
|
||||||
|
'width': '85px',
|
||||||
|
'padding_bottom': '2px',
|
||||||
|
'type': 'dropdown'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
22
public/js/clients/shared/pdf.js
vendored
22
public/js/clients/shared/pdf.js
vendored
@ -29,10 +29,10 @@ var PDF = /*#__PURE__*/function () {
|
|||||||
this.context = canvas.getContext('2d');
|
this.context = canvas.getContext('2d');
|
||||||
this.currentPage = 1;
|
this.currentPage = 1;
|
||||||
this.maxPages = 1;
|
this.maxPages = 1;
|
||||||
this.currentScale = 1.25;
|
this.currentScale = 1;
|
||||||
this.currentScaleText = document.getElementById('zoom-level');
|
this.currentScaleText = document.getElementById('zoom-level');
|
||||||
if (matchMedia('only screen and (max-width: 480px)').matches) {
|
if (matchMedia('only screen and (max-width: 480px)').matches) {
|
||||||
this.currentScale = 1.25;
|
this.currentScale = 1;
|
||||||
}
|
}
|
||||||
this.currentScaleText.textContent = this.currentScale * 100 + '%';
|
this.currentScaleText.textContent = this.currentScale * 100 + '%';
|
||||||
}
|
}
|
||||||
@ -135,6 +135,24 @@ var PDF = /*#__PURE__*/function () {
|
|||||||
viewport: viewport
|
viewport: viewport
|
||||||
});
|
});
|
||||||
this.setPagesInViewport();
|
this.setPagesInViewport();
|
||||||
|
|
||||||
|
/* document.addEventListener("webviewerloaded", function () {
|
||||||
|
PDFViewerApplication.initializedPromise.then(function () {
|
||||||
|
PDFViewerApplication.eventBus.on("pagerendered", function handler(event) {
|
||||||
|
try {
|
||||||
|
if (window.chrome && !/Edge/.test(navigator.userAgent) && !event.source.__rerendered) {
|
||||||
|
console.log("Chrome-like browser detected, re-rendering page %d for the first time.", event.pageNumber);
|
||||||
|
var currentScale = event.source.scale;
|
||||||
|
event.source.__rerendered = true;
|
||||||
|
event.source.update(currentScale * 0.99);
|
||||||
|
event.source.update(currentScale);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}); */
|
||||||
case 14:
|
case 14:
|
||||||
case "end":
|
case "end":
|
||||||
return _context.stop();
|
return _context.stop();
|
||||||
|
@ -19,14 +19,14 @@
|
|||||||
"/js/clients/payments/stripe-credit-card.js": "/js/clients/payments/stripe-credit-card.js?id=b483e14d15000c04edfe4c9c80fb97c9",
|
"/js/clients/payments/stripe-credit-card.js": "/js/clients/payments/stripe-credit-card.js?id=b483e14d15000c04edfe4c9c80fb97c9",
|
||||||
"/js/setup/setup.js": "/js/setup/setup.js?id=086b9e114b0b9ee01f909d686f489162",
|
"/js/setup/setup.js": "/js/setup/setup.js?id=086b9e114b0b9ee01f909d686f489162",
|
||||||
"/js/clients/payments/card-js.min.js": "/js/clients/payments/card-js.min.js?id=cf50b5ba1fcd1d184bf0c10d710672c8",
|
"/js/clients/payments/card-js.min.js": "/js/clients/payments/card-js.min.js?id=cf50b5ba1fcd1d184bf0c10d710672c8",
|
||||||
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=40f4f82b01d751c284337279b92b9297",
|
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=c9593b44d66f89874d13f99bc3e6ff33",
|
||||||
"/js/clients/shared/multiple-downloads.js": "/js/clients/shared/multiple-downloads.js?id=bc6756a5ef373ffab30373a6b689d5d4",
|
"/js/clients/shared/multiple-downloads.js": "/js/clients/shared/multiple-downloads.js?id=bc6756a5ef373ffab30373a6b689d5d4",
|
||||||
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=a9c53bbbced7b1f09cae117f667638cf",
|
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=a9c53bbbced7b1f09cae117f667638cf",
|
||||||
"/js/clients/payments/braintree-credit-card.js": "/js/clients/payments/braintree-credit-card.js?id=e0020a4104a2d88c21e47ec6679de7ef",
|
"/js/clients/payments/braintree-credit-card.js": "/js/clients/payments/braintree-credit-card.js?id=e0020a4104a2d88c21e47ec6679de7ef",
|
||||||
"/js/clients/payments/braintree-paypal.js": "/js/clients/payments/braintree-paypal.js?id=881f15cb83dc9d0412625da80f094912",
|
"/js/clients/payments/braintree-paypal.js": "/js/clients/payments/braintree-paypal.js?id=881f15cb83dc9d0412625da80f094912",
|
||||||
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=b8b588f18e7c692faa44b598f3f1bde0",
|
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=b8b588f18e7c692faa44b598f3f1bde0",
|
||||||
"/js/clients/payment_methods/wepay-bank-account.js": "/js/clients/payment_methods/wepay-bank-account.js?id=e984eca06a662d2e8a8e01cae085794c",
|
"/js/clients/payment_methods/wepay-bank-account.js": "/js/clients/payment_methods/wepay-bank-account.js?id=e984eca06a662d2e8a8e01cae085794c",
|
||||||
"/js/clients/payments/paytrace-credit-card.js": "/js/clients/payments/paytrace-credit-card.js?id=5ff9cc69d2923a89c05412bff3a8c862",
|
"/js/clients/payments/paytrace-credit-card.js": "/js/clients/payments/paytrace-credit-card.js?id=800e95b9c19d54e844338d619e87c9dc",
|
||||||
"/js/clients/payments/mollie-credit-card.js": "/js/clients/payments/mollie-credit-card.js?id=2f72b969507e6135b5c52a65522ab3ae",
|
"/js/clients/payments/mollie-credit-card.js": "/js/clients/payments/mollie-credit-card.js?id=2f72b969507e6135b5c52a65522ab3ae",
|
||||||
"/js/clients/payments/eway-credit-card.js": "/js/clients/payments/eway-credit-card.js?id=0d1c8957b02c5601b7d57c39740bff75",
|
"/js/clients/payments/eway-credit-card.js": "/js/clients/payments/eway-credit-card.js?id=0d1c8957b02c5601b7d57c39740bff75",
|
||||||
"/js/clients/payment_methods/braintree-ach.js": "/js/clients/payment_methods/braintree-ach.js?id=2f8e5af9ba5ce266d2ee49b084fbe291",
|
"/js/clients/payment_methods/braintree-ach.js": "/js/clients/payment_methods/braintree-ach.js?id=2f8e5af9ba5ce266d2ee49b084fbe291",
|
||||||
|
@ -17,44 +17,80 @@ class PayTraceCreditCard {
|
|||||||
|
|
||||||
get creditCardStyles() {
|
get creditCardStyles() {
|
||||||
return {
|
return {
|
||||||
font_color: '#111827',
|
'font_color': '#000',
|
||||||
border_color: 'rgba(210,214,220,1)',
|
'border_color': '#a1b1c9',
|
||||||
label_color: '#111827',
|
'border_style': 'dotted',
|
||||||
label_size: '12pt',
|
'font_size': '13pt',
|
||||||
background_color: 'white',
|
'input_border_radius': '3px',
|
||||||
border_style: 'solid',
|
'input_border_width': '1px',
|
||||||
font_size: '15pt',
|
'input_font': 'Times New Roman, arial, fantasy',
|
||||||
height: '30px',
|
'input_font_weight': '400',
|
||||||
width: '100%',
|
'input_margin': '5px 0px 5px 0px',
|
||||||
|
'input_padding': '0px 5px 0px 5px',
|
||||||
|
'label_color': '#a0aec0',
|
||||||
|
'label_size': '16px',
|
||||||
|
'label_width': '150px',
|
||||||
|
'label_font': 'Times New Roman, sans-serif, serif',
|
||||||
|
'label_font_weight': 'light',
|
||||||
|
'label_margin': '5px 0px 0px 0px',
|
||||||
|
'label_padding': '0px 5px 0px 5px',
|
||||||
|
'background_color': 'white',
|
||||||
|
'height': '30px',
|
||||||
|
'width': '370px',
|
||||||
|
'padding_bottom': '0px'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
get codeStyles() {
|
get codeStyles() {
|
||||||
return {
|
return {
|
||||||
font_color: '#111827',
|
'font_color': '#000',
|
||||||
border_color: 'rgba(210,214,220,1)',
|
'border_color': '#a1b1c9',
|
||||||
label_color: '#111827',
|
'border_style': 'dotted',
|
||||||
label_size: '12pt',
|
'font_size': '13pt',
|
||||||
background_color: 'white',
|
'input_border_radius': '2px',
|
||||||
border_style: 'solid',
|
'input_border_width': '1px',
|
||||||
font_size: '15pt',
|
'input_font': 'serif, cursive, fantasy',
|
||||||
height: '30px',
|
'input_font_weight': '700',
|
||||||
width: '300px',
|
'input_margin': '5px 0px 5px 20px',
|
||||||
|
'input_padding': '0px 5px 0px 5px',
|
||||||
|
'label_color': '#a0aec0',
|
||||||
|
'label_size': '16px',
|
||||||
|
'label_width': '150px',
|
||||||
|
'label_font': 'sans-serif, arial, serif',
|
||||||
|
'label_font_weight': 'bold',
|
||||||
|
'label_margin': '5px 0px 0px 20px',
|
||||||
|
'label_padding': '2px 5px 2px 5px',
|
||||||
|
'background_color': 'white',
|
||||||
|
'height': '30px',
|
||||||
|
'width': '150px',
|
||||||
|
'padding_bottom': '2px'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
get expStyles() {
|
get expStyles() {
|
||||||
return {
|
return {
|
||||||
font_color: '#111827',
|
'font_color': '#000',
|
||||||
border_color: 'rgba(210,214,220,1)',
|
'border_color': '#a1b1c9',
|
||||||
label_color: '#111827',
|
'border_style': 'dashed',
|
||||||
label_size: '12pt',
|
'font_size': '12pt',
|
||||||
background_color: 'white',
|
'input_border_radius': '0px',
|
||||||
border_style: 'solid',
|
'input_border_width': '2px',
|
||||||
font_size: '15pt',
|
'input_font': 'arial, cursive, fantasy',
|
||||||
height: '30px',
|
'input_font_weight': '400',
|
||||||
width: '85px',
|
'input_margin': '5px 0px 5px 0px',
|
||||||
type: 'dropdown',
|
'input_padding': '0px 5px 0px 5px',
|
||||||
|
'label_color': '#a0aec0',
|
||||||
|
'label_size': '16px',
|
||||||
|
'label_width': '150px',
|
||||||
|
'label_font': 'arial, fantasy, serif',
|
||||||
|
'label_font_weight': 'normal',
|
||||||
|
'label_margin': '5px 0px 0px 0px',
|
||||||
|
'label_padding': '2px 5px 2px 5px',
|
||||||
|
'background_color': 'white',
|
||||||
|
'height': '30px',
|
||||||
|
'width': '85px',
|
||||||
|
'padding_bottom': '2px',
|
||||||
|
'type': 'dropdown'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
resources/js/clients/shared/pdf.js
vendored
22
resources/js/clients/shared/pdf.js
vendored
@ -15,11 +15,11 @@ class PDF {
|
|||||||
this.context = canvas.getContext('2d');
|
this.context = canvas.getContext('2d');
|
||||||
this.currentPage = 1;
|
this.currentPage = 1;
|
||||||
this.maxPages = 1;
|
this.maxPages = 1;
|
||||||
this.currentScale = 1.25;
|
this.currentScale = 1;
|
||||||
this.currentScaleText = document.getElementById('zoom-level');
|
this.currentScaleText = document.getElementById('zoom-level');
|
||||||
|
|
||||||
if (matchMedia('only screen and (max-width: 480px)').matches) {
|
if (matchMedia('only screen and (max-width: 480px)').matches) {
|
||||||
this.currentScale = 1.25;
|
this.currentScale = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.currentScaleText.textContent = this.currentScale * 100 + '%';
|
this.currentScaleText.textContent = this.currentScale * 100 + '%';
|
||||||
@ -131,6 +131,24 @@ class PDF {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.setPagesInViewport();
|
this.setPagesInViewport();
|
||||||
|
|
||||||
|
/* document.addEventListener("webviewerloaded", function () {
|
||||||
|
PDFViewerApplication.initializedPromise.then(function () {
|
||||||
|
PDFViewerApplication.eventBus.on("pagerendered", function handler(event) {
|
||||||
|
try {
|
||||||
|
if (window.chrome && !/Edge/.test(navigator.userAgent) && !event.source.__rerendered) {
|
||||||
|
console.log("Chrome-like browser detected, re-rendering page %d for the first time.", event.pageNumber);
|
||||||
|
var currentScale = event.source.scale;
|
||||||
|
event.source.__rerendered = true;
|
||||||
|
event.source.update(currentScale * 0.99);
|
||||||
|
event.source.update(currentScale);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}); */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#shipping-details {
|
#shipping-details {
|
||||||
visibility: $show_shipping_address_visibility;
|
opacity: $show_shipping_address_visibility;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
line-height: var(--line-height);
|
line-height: var(--line-height);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
@php
|
@php
|
||||||
$mobile = stripos(request()->server('HTTP_USER_AGENT'), 'Android') || stripos(request()->server('HTTP_USER_AGENT'), 'iPhone') || stripos(request()->server('HTTP_USER_AGENT'), 'iPod') || stripos(request()->server('HTTP_USER_AGENT'), 'iPad');
|
//$mobile = stripos(request()->server('HTTP_USER_AGENT'), 'Android') || stripos(request()->server('HTTP_USER_AGENT'), 'iPhone') || stripos(request()->server('HTTP_USER_AGENT'), 'iPod') || stripos(request()->server('HTTP_USER_AGENT'), 'iPad');
|
||||||
|
$mobile = false;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@push('head')
|
@push('head')
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('gateway_footer')
|
@section('gateway_footer')
|
||||||
<script src="https://protect.paytrace.com/js/protect.min.js"></script>
|
@if($gateway->company_gateway->getConfigField('testMode'))
|
||||||
|
<script src='https://protect.sandbox.paytrace.com/js/protect.min.js'></script>
|
||||||
|
@else
|
||||||
|
<script src='https://protect.paytrace.com/js/protect.min.js'></script>
|
||||||
|
@endif
|
||||||
<script src="{{ asset('js/clients/payments/paytrace-credit-card.js') }}"></script>
|
<script src="{{ asset('js/clients/payments/paytrace-credit-card.js') }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -59,6 +59,10 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('gateway_footer')
|
@section('gateway_footer')
|
||||||
|
@if($gateway->company_gateway->getConfigField('testMode'))
|
||||||
|
<script src='https://protect.sandbox.paytrace.com/js/protect.min.js'></script>
|
||||||
|
@else
|
||||||
<script src='https://protect.paytrace.com/js/protect.min.js'></script>
|
<script src='https://protect.paytrace.com/js/protect.min.js'></script>
|
||||||
|
@endif
|
||||||
<script src="{{ asset('js/clients/payments/paytrace-credit-card.js') }}"></script>
|
<script src="{{ asset('js/clients/payments/paytrace-credit-card.js') }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user