mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 07:02:34 +01:00
commit
1134f28f9d
@ -1 +1 @@
|
|||||||
5.3.43
|
5.3.44
|
@ -78,11 +78,11 @@ class ApplePayDomain implements ShouldQueue
|
|||||||
if(Ninja::isHosted())
|
if(Ninja::isHosted())
|
||||||
{
|
{
|
||||||
|
|
||||||
if($this->company->portal_mode == 'domain'){
|
if($this->company_gateway->company->portal_mode == 'domain'){
|
||||||
$domain = $this->company->portal_domain;
|
$domain = $this->company_gateway->company->portal_domain;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$domain = $this->company->subdomain . '.' . config('ninja.app_domain');
|
$domain = $this->company_gateway->company->subdomain . '.' . config('ninja.app_domain');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ use App\PaymentDrivers\Braintree\CreditCard;
|
|||||||
use App\PaymentDrivers\Braintree\PayPal;
|
use App\PaymentDrivers\Braintree\PayPal;
|
||||||
use Braintree\Gateway;
|
use Braintree\Gateway;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
|
||||||
class BraintreePaymentDriver extends BaseDriver
|
class BraintreePaymentDriver extends BaseDriver
|
||||||
{
|
{
|
||||||
@ -245,4 +246,37 @@ class BraintreePaymentDriver extends BaseDriver
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function processWebhookRequest($request)
|
||||||
|
{
|
||||||
|
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
'bt_signature' => ['required'],
|
||||||
|
'bt_payload' => ['required'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return response()->json($validator->errors(), 422);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->init();
|
||||||
|
|
||||||
|
$webhookNotification = $this->gateway->webhookNotification()->parse(
|
||||||
|
$request->input("bt_signature"), $request->input("bt_payload")
|
||||||
|
);
|
||||||
|
|
||||||
|
nlog("braintree webhook");
|
||||||
|
|
||||||
|
if($webhookNotification)
|
||||||
|
nlog($webhookNotification->kind);
|
||||||
|
|
||||||
|
// // Example values for webhook notification properties
|
||||||
|
// $message = $webhookNotification->kind; // "subscription_went_past_due"
|
||||||
|
// $message = $webhookNotification->timestamp->format('D M j G:i:s T Y'); // "Sun Jan 1 00:00:00 UTC 2012"
|
||||||
|
|
||||||
|
return response()->json([], 200);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -306,8 +306,8 @@ trait MakesInvoiceValues
|
|||||||
|
|
||||||
//change quantity from localized number, to decimal format with no trailing zeroes 06/09/21
|
//change quantity from localized number, to decimal format with no trailing zeroes 06/09/21
|
||||||
$data[$key][$table_type.'.quantity'] = rtrim($item->quantity, $locale_info['decimal_point']);
|
$data[$key][$table_type.'.quantity'] = rtrim($item->quantity, $locale_info['decimal_point']);
|
||||||
$data[$key][$table_type.'.unit_cost'] = Number::formatMoneyNoRounding($item->cost, $this->client);
|
$data[$key][$table_type.'.unit_cost'] = Number::formatMoney($item->cost, $this->client);
|
||||||
$data[$key][$table_type.'.cost'] = Number::formatMoneyNoRounding($item->cost, $this->client);
|
$data[$key][$table_type.'.cost'] = Number::formatMoney($item->cost, $this->client);
|
||||||
|
|
||||||
$data[$key][$table_type.'.line_total'] = Number::formatMoney($item->line_total, $this->client);
|
$data[$key][$table_type.'.line_total'] = Number::formatMoney($item->line_total, $this->client);
|
||||||
|
|
||||||
|
@ -14,8 +14,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.3.43',
|
'app_version' => '5.3.44',
|
||||||
'app_tag' => '5.3.43',
|
'app_tag' => '5.3.44',
|
||||||
'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', ''),
|
||||||
|
2
public/css/app.css
vendored
2
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
|||||||
/*! For license information please see braintree-ach.js.LICENSE.txt */
|
/*! For license information please see braintree-ach.js.LICENSE.txt */
|
||||||
(()=>{var e;window.braintree.client.create({authorization:null===(e=document.querySelector('meta[name="client-token"]'))||void 0===e?void 0:e.content}).then((function(e){return braintree.usBankAccount.create({client:e})})).then((function(e){var t;null===(t=document.getElementById("authorize-bank-account"))||void 0===t||t.addEventListener("click",(function(t){t.target.parentElement.disabled=!0,document.getElementById("errors").hidden=!0,document.getElementById("errors").textContent="";var n={accountNumber:document.getElementById("account-number").value,routingNumber:document.getElementById("routing-number").value,accountType:document.querySelector('input[name="account-type"]:checked').value,ownershipType:document.querySelector('input[name="ownership-type"]:checked').value,billingAddress:{streetAddress:document.getElementById("billing-street-address").value,extendedAddress:document.getElementById("billing-extended-address").value,locality:document.getElementById("billing-locality").value,region:document.getElementById("billing-region").value,postalCode:document.getElementById("billing-postal-code").value}};if("personal"===n.ownershipType){var r=document.getElementById("account-holder-name").value.split(" ",2);n.firstName=r[0],n.lastName=r[1]}else n.businessName=document.getElementById("account-holder-name").value;e.tokenize({bankDetails:n,mandateText:'By clicking ["Checkout"], I authorize Braintree, a service of PayPal, on behalf of [your business name here] (i) to verify my bank account information using bank information and consumer reports and (ii) to debit my bank account.'}).then((function(e){document.querySelector("input[name=nonce]").value=e.nonce,document.getElementById("server_response").submit()})).catch((function(e){t.target.parentElement.disabled=!1,document.getElementById("errors").textContent="".concat(e.details.originalError.message," ").concat(e.details.originalError.details.originalError[0].message),document.getElementById("errors").hidden=!1}))}))})).catch((function(e){document.getElementById("errors").textContent="".concat(error.details.originalError.message," ").concat(error.details.originalError.details.originalError[0].message),document.getElementById("errors").hidden=!1}))})();
|
(()=>{var e;window.braintree.client.create({authorization:null===(e=document.querySelector('meta[name="client-token"]'))||void 0===e?void 0:e.content}).then((function(e){return braintree.usBankAccount.create({client:e})})).then((function(e){var t;null===(t=document.getElementById("authorize-bank-account"))||void 0===t||t.addEventListener("click",(function(t){t.target.parentElement.disabled=!0,document.getElementById("errors").hidden=!0,document.getElementById("errors").textContent="";var n={accountNumber:document.getElementById("account-number").value,routingNumber:document.getElementById("routing-number").value,accountType:document.querySelector('input[name="account-type"]:checked').value,ownershipType:document.querySelector('input[name="ownership-type"]:checked').value,billingAddress:{streetAddress:document.getElementById("billing-street-address").value,extendedAddress:document.getElementById("billing-extended-address").value,locality:document.getElementById("billing-locality").value,region:document.getElementById("billing-region").value,postalCode:document.getElementById("billing-postal-code").value}};if("personal"===n.ownershipType){var o=document.getElementById("account-holder-name").value.split(" ",2);n.firstName=o[0],n.lastName=o[1]}else n.businessName=document.getElementById("account-holder-name").value;e.tokenize({bankDetails:n,mandateText:'By clicking ["Checkout"], I authorize Braintree, a service of PayPal, on behalf of [your business name here] (i) to verify my bank account information using bank information and consumer reports and (ii) to debit my bank account.'}).then((function(e){document.querySelector("input[name=nonce]").value=e.nonce,document.getElementById("server_response").submit()})).catch((function(e){t.target.parentElement.disabled=!1,document.getElementById("errors").textContent="".concat(e.details.originalError.message," ").concat(e.details.originalError.details.originalError[0].message),document.getElementById("errors").hidden=!1}))}))})).catch((function(e){document.getElementById("errors").textContent=e.message,document.getElementById("errors").hidden=!1}))})();
|
@ -23,7 +23,7 @@
|
|||||||
"/js/clients/payments/paytrace-credit-card.js": "/js/clients/payments/paytrace-credit-card.js?id=59d9913b746fe5a540ff",
|
"/js/clients/payments/paytrace-credit-card.js": "/js/clients/payments/paytrace-credit-card.js?id=59d9913b746fe5a540ff",
|
||||||
"/js/clients/payments/mollie-credit-card.js": "/js/clients/payments/mollie-credit-card.js?id=c2cf632fb3cc91b4ff7c",
|
"/js/clients/payments/mollie-credit-card.js": "/js/clients/payments/mollie-credit-card.js?id=c2cf632fb3cc91b4ff7c",
|
||||||
"/js/clients/payments/eway-credit-card.js": "/js/clients/payments/eway-credit-card.js?id=ff17e039dd15d505448f",
|
"/js/clients/payments/eway-credit-card.js": "/js/clients/payments/eway-credit-card.js?id=ff17e039dd15d505448f",
|
||||||
"/js/clients/payment_methods/braintree-ach.js": "/js/clients/payment_methods/braintree-ach.js?id=656ad159838b726969f5",
|
"/js/clients/payment_methods/braintree-ach.js": "/js/clients/payment_methods/braintree-ach.js?id=6d8c7fd66d911b20cdc4",
|
||||||
"/js/clients/payments/square-credit-card.js": "/js/clients/payments/square-credit-card.js?id=8f05ce6bd2d6cae7e5f2",
|
"/js/clients/payments/square-credit-card.js": "/js/clients/payments/square-credit-card.js?id=8f05ce6bd2d6cae7e5f2",
|
||||||
"/js/clients/statements/view.js": "/js/clients/statements/view.js?id=4ed4c8a09803ddd0a9a7",
|
"/js/clients/statements/view.js": "/js/clients/statements/view.js?id=4ed4c8a09803ddd0a9a7",
|
||||||
"/js/clients/payments/razorpay-aio.js": "/js/clients/payments/razorpay-aio.js?id=c36ab5621413ef1de7c8",
|
"/js/clients/payments/razorpay-aio.js": "/js/clients/payments/razorpay-aio.js?id=c36ab5621413ef1de7c8",
|
||||||
@ -37,6 +37,6 @@
|
|||||||
"/js/clients/payments/stripe-ideal.js": "/js/clients/payments/stripe-ideal.js?id=73ce56676f9252b0cecf",
|
"/js/clients/payments/stripe-ideal.js": "/js/clients/payments/stripe-ideal.js?id=73ce56676f9252b0cecf",
|
||||||
"/js/clients/payments/stripe-przelewy24.js": "/js/clients/payments/stripe-przelewy24.js?id=f3a14f78bec8209c30ba",
|
"/js/clients/payments/stripe-przelewy24.js": "/js/clients/payments/stripe-przelewy24.js?id=f3a14f78bec8209c30ba",
|
||||||
"/js/clients/payments/stripe-browserpay.js": "/js/clients/payments/stripe-browserpay.js?id=71e49866d66a6d85b88a",
|
"/js/clients/payments/stripe-browserpay.js": "/js/clients/payments/stripe-browserpay.js?id=71e49866d66a6d85b88a",
|
||||||
"/css/app.css": "/css/app.css?id=9260888e310e8331d856",
|
"/css/app.css": "/css/app.css?id=cab8a6526b0f9f71842d",
|
||||||
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
|
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,8 @@ window.braintree.client.create({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
document.getElementById('errors').textContent = `${error.details.originalError.message} ${error.details.originalError.details.originalError[0].message}`;
|
|
||||||
|
document.getElementById('errors').textContent = err.message;
|
||||||
document.getElementById('errors').hidden = false;
|
document.getElementById('errors').hidden = false;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user