diff --git a/.env.example b/.env.example
index 3b870ff2b844..ce0cd9128663 100644
--- a/.env.example
+++ b/.env.example
@@ -20,4 +20,6 @@ MAIL_FROM_ADDRESS
MAIL_FROM_NAME
MAIL_PASSWORD
-PHANTOMJS_CLOUD_KEY='a-demo-key-with-low-quota-per-ip-address'
\ No newline at end of file
+PHANTOMJS_CLOUD_KEY='a-demo-key-with-low-quota-per-ip-address'
+
+LOG=single
diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php
index 2f53f9d486e2..dc55b08fc0d2 100644
--- a/app/Http/Controllers/AccountGatewayController.php
+++ b/app/Http/Controllers/AccountGatewayController.php
@@ -97,7 +97,11 @@ class AccountGatewayController extends BaseController
$data['url'] = 'gateways';
$data['method'] = 'POST';
$data['title'] = trans('texts.add_gateway');
- $data['selectGateways'] = Gateway::where('payment_library_id', '=', 1)->where('id', '!=', GATEWAY_PAYPAL_EXPRESS)->where('id', '!=', GATEWAY_PAYPAL_EXPRESS)->orderBy('name')->get();
+ $data['selectGateways'] = Gateway::where('payment_library_id', '=', 1)
+ ->where('id', '!=', GATEWAY_PAYPAL_EXPRESS)
+ ->where('id', '!=', GATEWAY_BITPAY)
+ ->where('id', '!=', GATEWAY_DWOLLA)
+ ->orderBy('name')->get();
$data['hiddenFields'] = Gateway::$hiddenFields;
return View::make('accounts.account_gateway', $data);
diff --git a/app/Http/Controllers/IntegrationController.php b/app/Http/Controllers/IntegrationController.php
index de30afdfaf86..740c91e36127 100644
--- a/app/Http/Controllers/IntegrationController.php
+++ b/app/Http/Controllers/IntegrationController.php
@@ -13,10 +13,11 @@ class IntegrationController extends Controller
$eventId = Utils::lookupEventId(trim(Input::get('event')));
if (!$eventId) {
- return Response::json('', 500);
+ return Response::json('Event is invalid', 500);
}
- $subscription = Subscription::where('account_id', '=', Auth::user()->account_id)->where('event_id', '=', $eventId)->first();
+ $subscription = Subscription::where('account_id', '=', Auth::user()->account_id)
+ ->where('event_id', '=', $eventId)->first();
if (!$subscription) {
$subscription = new Subscription();
@@ -27,6 +28,10 @@ class IntegrationController extends Controller
$subscription->target_url = trim(Input::get('target_url'));
$subscription->save();
+ if (!$subscription->id) {
+ return Response::json('Failed to create subscription', 500);
+ }
+
return Response::json('{"id":'.$subscription->id.'}', 201);
}
}
diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php
index 0c64ef15b6dd..2a4eb331305f 100644
--- a/app/Http/Controllers/PaymentController.php
+++ b/app/Http/Controllers/PaymentController.php
@@ -368,7 +368,8 @@ class PaymentController extends BaseController
'message' => $affiliate->payment_subtitle,
'license' => $licenseKey,
'hideHeader' => true,
- 'productId' => $license->product_id
+ 'productId' => $license->product_id,
+ 'price' => $affiliate->price,
];
$name = "{$license->first_name} {$license->last_name}";
diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php
index 60e8b378c212..650a9ef74117 100644
--- a/app/Libraries/Utils.php
+++ b/app/Libraries/Utils.php
@@ -599,9 +599,8 @@ class Utils
public static function notifyZapier($subscription, $data)
{
$curl = curl_init();
-
$jsonEncodedData = json_encode($data->toPublicArray());
-
+
$opts = [
CURLOPT_URL => $subscription->target_url,
CURLOPT_RETURNTRANSFER => true,
@@ -635,14 +634,23 @@ class Utils
return $return;
}
- public static function hideIds($data)
+ public static function hideIds($data, $mapped = false)
{
$publicId = null;
+ if (!$mapped) {
+ $mapped = [];
+ }
+
foreach ($data as $key => $val) {
if (is_array($val)) {
- $data[$key] = Utils::hideIds($val);
- } else if ($key == 'id' || strpos($key, '_id')) {
+ if ($key == 'account' || isset($mapped[$key])) {
+ unset($data[$key]);
+ } else {
+ $mapped[$key] = true;
+ $data[$key] = Utils::hideIds($val, $mapped);
+ }
+ } elseif ($key == 'id' || strpos($key, '_id')) {
if ($key == 'public_id') {
$publicId = $val;
}
diff --git a/app/Models/Account.php b/app/Models/Account.php
index 6817275a8a99..adc365a612e7 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -13,6 +13,7 @@ class Account extends Eloquent
{
use SoftDeletes;
protected $dates = ['deleted_at'];
+ protected $hidden = ['ip'];
/*
protected $casts = [
diff --git a/config/app.php b/config/app.php
index 8eaa0582bf68..5b6fdff42998 100644
--- a/config/app.php
+++ b/config/app.php
@@ -97,7 +97,7 @@ return [
|
*/
- 'log' => 'single',
+ 'log' => env('LOG', 'single'),
/*
|--------------------------------------------------------------------------
diff --git a/database/migrations/2014_07_24_171214_add_zapier_support.php b/database/migrations/2014_07_24_171214_add_zapier_support.php
index b7bfc0a5bae3..3c8fbe69829f 100644
--- a/database/migrations/2014_07_24_171214_add_zapier_support.php
+++ b/database/migrations/2014_07_24_171214_add_zapier_support.php
@@ -24,7 +24,6 @@ class AddZapierSupport extends Migration {
$table->string('target_url');
$table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
- $table->unique( ['account_id', 'event_id'] );
});
}
diff --git a/resources/lang/de/texts.php b/resources/lang/de/texts.php
index 675a9155eeea..97f6744a6b63 100644
--- a/resources/lang/de/texts.php
+++ b/resources/lang/de/texts.php
@@ -265,10 +265,10 @@ return array(
'user_email_footer' => 'Um deine E-Mail-Benachrichtigungen anzupassen besuche bitte '.SITE_URL.'/company/notifications',
'invoice_link_message' => 'Um deine Kundenrechnung anzuschauen, klicke auf den folgenden Link:',
'notification_invoice_paid_subject' => 'Die Rechnung :invoice wurde von :client bezahlt.',
- 'notification_invoice_sent_subject' => 'Die Rechnung :invoice wurde an :client versandt.',
+ 'notification_invoice_sent_subject' => 'Die Rechnung :invoice wurde an :client versendet.',
'notification_invoice_viewed_subject' => 'Die Rechnung :invoice wurde von :client angeschaut.',
'notification_invoice_paid' => 'Eine Zahlung von :amount wurde von :client bezüglich Rechnung :invoice getätigt.',
- 'notification_invoice_sent' => 'Dem Kunden :client wurde die Rechnung :invoice über :amount versandt.',
+ 'notification_invoice_sent' => 'Dem Kunden :client wurde die Rechnung :invoice über :amount versendet.',
'notification_invoice_viewed' => 'Der Kunde :client hat sich die Rechnung :invoice über :amount angesehen.',
'reset_password' => 'Du kannst dein Passwort zurücksetzen, indem du auf den folgenden Link klickst:',
'reset_password_footer' => 'Wenn du das Zurücksetzen des Passworts nicht beantragt hast, benachrichtige bitte unseren Support: ' . CONTACT_EMAIL,
@@ -348,7 +348,7 @@ return array(
'advanced_settings' => 'Erweiterte Einstellungen',
'pro_plan_advanced_settings' => ':link um durch eine Pro-Mitgliedschaft erweiterte Einstellungen zu aktivieren',
- 'invoice_design' => 'Rechnungsvorlage',
+ 'invoice_design' => 'Rechnungsdesign',
'specify_colors' => 'Farben wählen',
'specify_colors_label' => 'Wähle die in der Rechnung verwendeten Farben',
@@ -452,14 +452,14 @@ return array(
'gateway_help_23' => 'Anmerkung: benutze deinen secret API key, nicht deinen publishable API key.',
'gateway_help_27' => ':link um sich bei TwoCheckout anzumelden.',
- 'more_designs' => 'Weitere Vorlagen',
- 'more_designs_title' => 'Zusätzliche Rechnungsvorlagen',
- 'more_designs_cloud_header' => 'Werde Pro-Mitglied für zusätzliche Rechnungsvorlagen',
+ 'more_designs' => 'Weitere Designs',
+ 'more_designs_title' => 'Zusätzliche Rechnungsdesigns',
+ 'more_designs_cloud_header' => 'Werde Pro-Mitglied für zusätzliche Rechnungsdesigns',
'more_designs_cloud_text' => '',
- 'more_designs_self_host_header' => 'Erhalte 6 zusätzliche Rechnungsvorlagen für nur $'.INVOICE_DESIGNS_PRICE,
+ 'more_designs_self_host_header' => 'Erhalte 6 zusätzliche Rechnungsdesigns für nur $'.INVOICE_DESIGNS_PRICE,
'more_designs_self_host_text' => '',
'buy' => 'Kaufen',
- 'bought_designs' => 'Die zusätzliche Rechnungsvorlagen wurden erfolgreich hinzugefügt',
+ 'bought_designs' => 'Die zusätzliche Rechnungsdesigns wurden erfolgreich hinzugefügt',
'sent' => 'gesendet',
'vat_number' => 'USt-IdNr.',
@@ -761,7 +761,7 @@ return array(
'reset_footer' => 'Reset footer',
'invoices_sent' => ':count invoice sent|:count invoices sent',
'status_draft' => 'Entwurf',
- 'status_sent' => 'Versandt',
+ 'status_sent' => 'Versendet',
'status_viewed' => 'Angesehen',
'status_partial' => 'Teilweise',
'status_paid' => 'Bezahlt',
@@ -789,7 +789,7 @@ return array(
'referral_program' => 'Referral Program',
'referral_code' => 'Referral Code',
- 'last_sent_on' => 'Zuletzt versandt am :date',
+ 'last_sent_on' => 'Zuletzt versendet am :date',
'page_expire' => 'Diese Seite wird bald ablaufen, :click_here um weiter zu arbeiten',
diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php
index 8098a95808c4..28f37df03886 100644
--- a/resources/views/header.blade.php
+++ b/resources/views/header.blade.php
@@ -123,6 +123,7 @@
success: function(result) {
if (result) {
localStorage.setItem('guest_key', '');
+ fbq('track', 'CompleteRegistration');
trackEvent('/account', '/signed_up');
NINJA.isRegistered = true;
$('#signUpButton').hide();
@@ -164,6 +165,7 @@
NINJA.proPlanFeature = '';
function showProPlan(feature) {
$('#proPlanModal').modal('show');
+ fbq('track', 'InitiateCheckout');
trackEvent('/account', '/show_pro_plan/' + feature);
NINJA.proPlanFeature = feature;
}
@@ -178,6 +180,7 @@
@if (Auth::check() && !Auth::user()->isPro())
function submitProPlan() {
+ fbq('track', 'AddPaymentInfo');
trackEvent('/account', '/submit_pro_plan/' + NINJA.proPlanFeature);
if (NINJA.isRegistered) {
$.ajax({
diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php
index ec36ceb95f61..66a5954ec1fc 100644
--- a/resources/views/invoices/edit.blade.php
+++ b/resources/views/invoices/edit.blade.php
@@ -1171,12 +1171,16 @@
self.is_amount_discount = ko.observable(0);
self.frequency_id = ko.observable(4); // default to monthly
self.terms = ko.observable('');
- self.default_terms = ko.observable("{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_terms)) }}");
- self.terms_placeholder = ko.observable({{ !$invoice && $account->invoice_terms ? 'true' : 'false' }} ? self.default_terms() : '');
+ //self.default_terms = ko.observable("{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_terms)) }}");
+ //self.terms_placeholder = ko.observable({{ !$invoice && $account->invoice_terms ? 'true' : 'false' }} ? self.default_terms() : '');
+ self.default_terms = ko.observable(account.invoice_terms);
+ self.terms_placeholder = ko.observable({{ !$invoice && $account->invoice_terms ? 'account.invoice_terms' : false}});
self.set_default_terms = ko.observable(false);
self.invoice_footer = ko.observable('');
- self.default_footer = ko.observable("{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) }}");
- self.footer_placeholder = ko.observable({{ !$invoice && $account->invoice_footer ? 'true' : 'false' }} ? self.default_footer() : '');
+ //self.default_footer = ko.observable("{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) }}");
+ //self.footer_placeholder = ko.observable({{ !$invoice && $account->invoice_footer ? 'true' : 'false' }} ? self.default_footer() : '');
+ self.default_footer = ko.observable(account.invoice_footer);
+ self.footer_placeholder = ko.observable({{ !$invoice && $account->invoice_footer ? 'account.invoice_footer' : false}});
self.set_default_footer = ko.observable(false);
self.public_notes = ko.observable('');
self.po_number = ko.observable('');
@@ -1813,6 +1817,7 @@
var products = {!! $products !!};
var clients = {!! $clients !!};
var countries = {!! $countries !!};
+ var account = {!! Auth::user()->account !!};
var clientMap = {};
var $clientSelect = $('select#client');
diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php
index 93fc0963553e..5ea7118c9241 100644
--- a/resources/views/master.blade.php
+++ b/resources/views/master.blade.php
@@ -63,6 +63,21 @@
+
+
+
+
+