mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
ac7d8b40fa
@ -1 +1 @@
|
|||||||
5.8.52
|
5.8.53
|
@ -43,7 +43,7 @@ class ClientRegisterService
|
|||||||
|
|
||||||
foreach ($rules as $field => $properties) {
|
foreach ($rules as $field => $properties) {
|
||||||
if ($field === 'email') {
|
if ($field === 'email') {
|
||||||
$rules[$field] = array_merge($rules[$field], ['email:rfc,dns', 'max:191', Rule::unique('client_contacts')->where('company_id', $this->company->id)]);
|
$rules[$field] = array_merge($rules[$field], ['email:rfc', 'max:191', Rule::unique('client_contacts')->where('company_id', $this->company->id)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($field === 'current_password' || $field === 'password') {
|
if ($field === 'current_password' || $field === 'password') {
|
||||||
|
@ -59,6 +59,8 @@ class Register extends Component
|
|||||||
|
|
||||||
public function register(array $data)
|
public function register(array $data)
|
||||||
{
|
{
|
||||||
|
nlog($data);
|
||||||
|
|
||||||
$service = new ClientRegisterService(
|
$service = new ClientRegisterService(
|
||||||
company: $this->subscription->company,
|
company: $this->subscription->company,
|
||||||
additional: $this->additional_fields,
|
additional: $this->additional_fields,
|
||||||
@ -66,8 +68,13 @@ class Register extends Component
|
|||||||
|
|
||||||
$rules = $service->rules();
|
$rules = $service->rules();
|
||||||
|
|
||||||
|
nlog($rules);
|
||||||
|
|
||||||
$data = Validator::make($data, $rules)->validate();
|
$data = Validator::make($data, $rules)->validate();
|
||||||
|
|
||||||
|
nlog("validated data");
|
||||||
|
nlog($data);
|
||||||
|
|
||||||
$client = $service->createClient($data);
|
$client = $service->createClient($data);
|
||||||
$contact = $service->createClientContact($data, $client);
|
$contact = $service->createClientContact($data, $client);
|
||||||
|
|
||||||
|
@ -244,7 +244,8 @@ return render('gateways.paypal.pay', $data);
|
|||||||
nlog("post order creation");
|
nlog("post order creation");
|
||||||
nlog($orderId);
|
nlog($orderId);
|
||||||
|
|
||||||
$r = $this->gatewayRequest("/v2/checkout/orders/{$orderId}", 'get', ['body' => '']);
|
|
||||||
|
$r = $this->gatewayRequest("/v2/checkout/orders/{$orderId}", 'get', ['body' => '']);
|
||||||
nlog($r);
|
nlog($r);
|
||||||
|
|
||||||
$response = $r->json();
|
$response = $r->json();
|
||||||
@ -400,7 +401,7 @@ return render('gateways.paypal.pay', $data);
|
|||||||
$data['token'] = $token;
|
$data['token'] = $token;
|
||||||
$data['payment_method_id'] = GatewayType::PAYPAL_ADVANCED_CARDS;
|
$data['payment_method_id'] = GatewayType::PAYPAL_ADVANCED_CARDS;
|
||||||
$data['payment_meta'] = $payment_meta;
|
$data['payment_meta'] = $payment_meta;
|
||||||
$data['payment_method_id'] = GatewayType::CREDIT_CARD;
|
// $data['payment_method_id'] = GatewayType::CREDIT_CARD;
|
||||||
|
|
||||||
$additional['gateway_customer_reference'] = $gateway_customer_reference;
|
$additional['gateway_customer_reference'] = $gateway_customer_reference;
|
||||||
|
|
||||||
|
@ -208,11 +208,6 @@ class InstantPayment
|
|||||||
$credit_totals = in_array($first_invoice->client->getSetting('use_credits_payment'), ['always', 'option']) ? $first_invoice->client->service()->getCreditBalance() : 0;
|
$credit_totals = in_array($first_invoice->client->getSetting('use_credits_payment'), ['always', 'option']) ? $first_invoice->client->service()->getCreditBalance() : 0;
|
||||||
$starting_invoice_amount = $first_invoice->balance;
|
$starting_invoice_amount = $first_invoice->balance;
|
||||||
|
|
||||||
/* Schedule a job to check the gateway fees for this invoice*/
|
|
||||||
// if (Ninja::isHosted()) {
|
|
||||||
// CheckGatewayFee::dispatch($first_invoice->id, $client->company->db)->delay(800);
|
|
||||||
// }
|
|
||||||
|
|
||||||
if ($gateway) {
|
if ($gateway) {
|
||||||
$first_invoice->service()->addGatewayFee($gateway, $payment_method_id, $invoice_totals)->save();
|
$first_invoice->service()->addGatewayFee($gateway, $payment_method_id, $invoice_totals)->save();
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,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' => env('APP_VERSION', '5.8.52'),
|
'app_version' => env('APP_VERSION', '5.8.53'),
|
||||||
'app_tag' => env('APP_TAG', '5.8.52'),
|
'app_tag' => env('APP_TAG', '5.8.53'),
|
||||||
'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', false),
|
'api_secret' => env('API_SECRET', false),
|
||||||
|
@ -97,17 +97,11 @@
|
|||||||
if(liabilityShift) {
|
if(liabilityShift) {
|
||||||
|
|
||||||
/* Handle liability shift. More information in 3D Secure response parameters */
|
/* Handle liability shift. More information in 3D Secure response parameters */
|
||||||
console.log("inside liability shift")
|
|
||||||
console.log(liabilityShift)
|
|
||||||
console.log(orderID);
|
|
||||||
console.log(data);
|
|
||||||
//doesn't really do anything as failure is linked in SUBMIT. We only hit here after a successful return
|
|
||||||
//and where SCA is optional?
|
|
||||||
|
|
||||||
if(liabilityShift == 'NO') {
|
if(liabilityShift == 'NO') {
|
||||||
|
|
||||||
document.getElementById('errors').textContent = `Sorry, your transaction could not be processed, Please try a different payment method.`;
|
document.getElementById('errors').textContent = `Sorry, your transaction could not be processed, Please try a different payment method.`;
|
||||||
document.getElementById('errors').hidden = false;
|
document.getElementById('errors').hidden = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,9 +112,6 @@
|
|||||||
return actions.restart();
|
return actions.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log("on approve");
|
|
||||||
// console.log(data);
|
|
||||||
// console.log(actions);
|
|
||||||
let storeCard = document.querySelector('input[name=token-billing-checkbox]:checked');
|
let storeCard = document.querySelector('input[name=token-billing-checkbox]:checked');
|
||||||
|
|
||||||
if (storeCard) {
|
if (storeCard) {
|
||||||
@ -182,7 +173,6 @@
|
|||||||
expiryField.render("#card-expiry-field-container");
|
expiryField.render("#card-expiry-field-container");
|
||||||
|
|
||||||
document.getElementById("pay-now").addEventListener('click', (e) => {
|
document.getElementById("pay-now").addEventListener('click', (e) => {
|
||||||
console.log("paynow");
|
|
||||||
document.getElementById('errors').textContent = '';
|
document.getElementById('errors').textContent = '';
|
||||||
document.getElementById('errors').hidden = true;
|
document.getElementById('errors').hidden = true;
|
||||||
|
|
||||||
@ -196,14 +186,9 @@
|
|||||||
document.querySelector('#pay-now > span').classList.add('hidden');
|
document.querySelector('#pay-now > span').classList.add('hidden');
|
||||||
|
|
||||||
cardField.submit().then((response) => {
|
cardField.submit().then((response) => {
|
||||||
console.log("then");
|
|
||||||
console.log(response);
|
|
||||||
|
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
|
||||||
// console.log("catch error")
|
|
||||||
// console.log(error);
|
|
||||||
|
|
||||||
document.getElementById('pay-now').disabled = false;
|
document.getElementById('pay-now').disabled = false;
|
||||||
document.querySelector('#pay-now > svg').classList.add('hidden');
|
document.querySelector('#pay-now > svg').classList.add('hidden');
|
||||||
document.querySelector('#pay-now > span').classList.remove('hidden');
|
document.querySelector('#pay-now > span').classList.remove('hidden');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user