Adding support for Dwolla

This commit is contained in:
Hillel Coren 2015-05-31 15:37:29 +03:00
parent 9ffcf9f3ef
commit 1a8245dcff
17 changed files with 260 additions and 124 deletions

View File

@ -31,7 +31,7 @@ class SendRenewalInvoices extends Command
$accounts = Account::whereRaw('datediff(curdate(), pro_plan_paid) = 355')->get(); $accounts = Account::whereRaw('datediff(curdate(), pro_plan_paid) = 355')->get();
$this->info(count($accounts).' accounts found'); $this->info(count($accounts).' accounts found');
dd(0);
foreach ($accounts as $account) { foreach ($accounts as $account) {
$client = $this->accountRepo->getNinjaClient($account); $client = $this->accountRepo->getNinjaClient($account);
$invitation = $this->accountRepo->createNinjaInvoice($client); $invitation = $this->accountRepo->createNinjaInvoice($client);

View File

@ -69,6 +69,7 @@ class AccountGatewayController extends BaseController
$data['method'] = 'PUT'; $data['method'] = 'PUT';
$data['title'] = trans('texts.edit_gateway') . ' - ' . $accountGateway->gateway->name; $data['title'] = trans('texts.edit_gateway') . ' - ' . $accountGateway->gateway->name;
$data['config'] = $configFields; $data['config'] = $configFields;
$data['hiddenFields'] = Gateway::$hiddenFields;
$data['paymentTypeId'] = $accountGateway->getPaymentType(); $data['paymentTypeId'] = $accountGateway->getPaymentType();
$data['selectGateways'] = Gateway::where('id', '=', $accountGateway->gateway_id)->get(); $data['selectGateways'] = Gateway::where('id', '=', $accountGateway->gateway_id)->get();
@ -97,6 +98,7 @@ class AccountGatewayController extends BaseController
$data['method'] = 'POST'; $data['method'] = 'POST';
$data['title'] = trans('texts.add_gateway'); $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_PAYPAL_EXPRESS)->orderBy('name')->get();
$data['hiddenFields'] = Gateway::$hiddenFields;
return View::make('accounts.account_gateway', $data); return View::make('accounts.account_gateway', $data);
} }
@ -107,7 +109,7 @@ class AccountGatewayController extends BaseController
$account = Auth::user()->account; $account = Auth::user()->account;
$paymentTypes = []; $paymentTypes = [];
foreach ([PAYMENT_TYPE_CREDIT_CARD, PAYMENT_TYPE_PAYPAL, PAYMENT_TYPE_BITCOIN] as $type) { foreach (Gateway::$paymentTypes as $type) {
if ($accountGateway || !$account->getGatewayByType($type)) { if ($accountGateway || !$account->getGatewayByType($type)) {
$paymentTypes[$type] = trans('texts.'.strtolower($type)); $paymentTypes[$type] = trans('texts.'.strtolower($type));
@ -132,7 +134,9 @@ class AccountGatewayController extends BaseController
$gateways = Gateway::where('payment_library_id', '=', 1)->orderBy('name')->get(); $gateways = Gateway::where('payment_library_id', '=', 1)->orderBy('name')->get();
foreach ($gateways as $gateway) { foreach ($gateways as $gateway) {
$gateway->fields = $gateway->getFields(); $fields = $gateway->getFields();
asort($fields);
$gateway->fields = $fields;
if ($accountGateway && $accountGateway->gateway_id == $gateway->id) { if ($accountGateway && $accountGateway->gateway_id == $gateway->id) {
$accountGateway->fields = $gateway->fields; $accountGateway->fields = $gateway->fields;
} }
@ -182,6 +186,8 @@ class AccountGatewayController extends BaseController
$gatewayId = GATEWAY_PAYPAL_EXPRESS; $gatewayId = GATEWAY_PAYPAL_EXPRESS;
} elseif ($paymentType == PAYMENT_TYPE_BITCOIN) { } elseif ($paymentType == PAYMENT_TYPE_BITCOIN) {
$gatewayId = GATEWAY_BITPAY; $gatewayId = GATEWAY_BITPAY;
} elseif ($paymentType = PAYMENT_TYPE_DWOLLA) {
$gatewayId = GATEWAY_DWOLLA;
} }
if (!$gatewayId) { if (!$gatewayId) {
@ -194,7 +200,7 @@ class AccountGatewayController extends BaseController
$fields = $gateway->getFields(); $fields = $gateway->getFields();
foreach ($fields as $field => $details) { foreach ($fields as $field => $details) {
if (!in_array($field, ['testMode', 'developerMode', 'headerImageUrl', 'solutionType', 'landingPage', 'brandName', 'logoImageUrl', 'borderColor'])) { if (!in_array($field, array_merge(Gateway::$hiddenFields, Gateway::$optionalFields))) {
if (strtolower($gateway->name) == 'beanstream') { if (strtolower($gateway->name) == 'beanstream') {
if (in_array($field, ['merchant_id', 'passCode'])) { if (in_array($field, ['merchant_id', 'passCode'])) {
$rules[$gateway->id.'_'.$field] = 'required'; $rules[$gateway->id.'_'.$field] = 'required';

View File

@ -76,9 +76,16 @@ class ClientController extends BaseController
if (!$model->deleted_at || $model->deleted_at == '0000-00-00') { if (!$model->deleted_at || $model->deleted_at == '0000-00-00') {
$str .= '<li><a href="'.URL::to('clients/'.$model->public_id.'/edit').'">'.trans('texts.edit_client').'</a></li> $str .= '<li><a href="'.URL::to('clients/'.$model->public_id.'/edit').'">'.trans('texts.edit_client').'</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="'.URL::to('invoices/create/'.$model->public_id).'">'.trans('texts.new_invoice').'</a></li> <li><a href="'.URL::to('tasks/create/'.$model->public_id).'">'.trans('texts.new_task').'</a></li>
<li><a href="'.URL::to('payments/create/'.$model->public_id).'">'.trans('texts.new_payment').'</a></li> <li><a href="'.URL::to('invoices/create/'.$model->public_id).'">'.trans('texts.new_invoice').'</a></li>';
<li><a href="'.URL::to('credits/create/'.$model->public_id).'">'.trans('texts.new_credit').'</a></li>
if (Auth::user()->isPro()) {
$str .= '<li><a href="'.URL::to('quotes/create/'.$model->public_id).'">'.trans('texts.new_quote').'</a></li>';
}
$str .= '<li class="divider"></li>
<li><a href="'.URL::to('payments/create/'.$model->public_id).'">'.trans('texts.enter_payment').'</a></li>
<li><a href="'.URL::to('credits/create/'.$model->public_id).'">'.trans('texts.enter_credit').'</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="javascript:archiveEntity('.$model->public_id.')">'.trans('texts.archive_client').'</a></li>'; <li><a href="javascript:archiveEntity('.$model->public_id.')">'.trans('texts.archive_client').'</a></li>';
} else { } else {
@ -113,15 +120,18 @@ class ClientController extends BaseController
Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT); Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT);
$actionLinks = [ $actionLinks = [
['label' => trans('texts.create_task'), 'url' => '/tasks/create/'.$client->public_id], ['label' => trans('texts.new_task'), 'url' => '/tasks/create/'.$client->public_id]
['label' => trans('texts.enter_payment'), 'url' => '/payments/create/'.$client->public_id],
['label' => trans('texts.enter_credit'), 'url' => '/credits/create/'.$client->public_id],
]; ];
if (Utils::isPro()) { if (Utils::isPro()) {
array_unshift($actionLinks, ['label' => trans('texts.create_quote'), 'url' => '/quotes/create/'.$client->public_id]); array_push($actionLinks, ['label' => trans('texts.new_quote'), 'url' => '/quotes/create/'.$client->public_id]);
} }
array_push($actionLinks,
['label' => trans('texts.enter_payment'), 'url' => '/payments/create/'.$client->public_id],
['label' => trans('texts.enter_credit'), 'url' => '/credits/create/'.$client->public_id]
);
$data = array( $data = array(
'actionLinks' => $actionLinks, 'actionLinks' => $actionLinks,
'showBreadcrumbs' => false, 'showBreadcrumbs' => false,

View File

@ -221,7 +221,7 @@ class InvoiceController extends BaseController
'url' => URL::to("payment/{$invitation->invitation_key}/".PAYMENT_TYPE_TOKEN), 'label' => trans('texts.use_card_on_file') 'url' => URL::to("payment/{$invitation->invitation_key}/".PAYMENT_TYPE_TOKEN), 'label' => trans('texts.use_card_on_file')
]; ];
} }
foreach([PAYMENT_TYPE_CREDIT_CARD, PAYMENT_TYPE_PAYPAL, PAYMENT_TYPE_BITCOIN] as $type) { foreach(Gateway::$paymentTypes as $type) {
if ($account->getGatewayByType($type)) { if ($account->getGatewayByType($type)) {
$paymentTypes[] = [ $paymentTypes[] = [
'url' => URL::to("/payment/{$invitation->invitation_key}/{$type}"), 'label' => trans('texts.'.strtolower($type)) 'url' => URL::to("/payment/{$invitation->invitation_key}/{$type}"), 'label' => trans('texts.'.strtolower($type))

View File

@ -195,11 +195,6 @@ class PaymentController extends BaseController
$gateway = Omnipay::create($accountGateway->gateway->provider); $gateway = Omnipay::create($accountGateway->gateway->provider);
$config = json_decode($accountGateway->config); $config = json_decode($accountGateway->config);
/*
$gateway->setSolutionType("Sole");
$gateway->setLandingPage("Billing");
*/
foreach ($config as $key => $val) { foreach ($config as $key => $val) {
if (!$val) { if (!$val) {
continue; continue;
@ -209,8 +204,8 @@ class PaymentController extends BaseController
$gateway->$function($val); $gateway->$function($val);
} }
if (Utils::isNinjaDev()) { if ($accountGateway->gateway->id == GATEWAY_DWOLLA) {
$gateway->setTestMode(true); $gateway->setKeySecret($_ENV['DWOLLA_KEY'], $_ENV['DWOLLA_SECRET']);
} }
return $gateway; return $gateway;

View File

@ -31,6 +31,7 @@ Route::get('/', 'HomeController@showIndex');
Route::get('terms', 'HomeController@showTerms'); Route::get('terms', 'HomeController@showTerms');
Route::get('log_error', 'HomeController@logError'); Route::get('log_error', 'HomeController@logError');
Route::get('invoice_now', 'HomeController@invoiceNow'); Route::get('invoice_now', 'HomeController@invoiceNow');
Route::get('keep_alive', 'HomeController@keepAlive');
Route::post('get_started', 'AccountController@getStarted'); Route::post('get_started', 'AccountController@getStarted');
// Client visible pages // Client visible pages
@ -78,7 +79,6 @@ if (Utils::isNinja()) {
Route::post('/signup/register', 'AccountController@doRegister'); Route::post('/signup/register', 'AccountController@doRegister');
Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed'); Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed');
Route::get('/demo', 'AccountController@demo'); Route::get('/demo', 'AccountController@demo');
Route::get('/keep_alive', 'HomeController@keepAlive');
} }
Route::group(['middleware' => 'auth'], function() { Route::group(['middleware' => 'auth'], function() {
@ -339,6 +339,7 @@ define('GATEWAY_BEANSTREAM', 29);
define('GATEWAY_PSIGATE', 30); define('GATEWAY_PSIGATE', 30);
define('GATEWAY_MOOLAH', 31); define('GATEWAY_MOOLAH', 31);
define('GATEWAY_BITPAY', 42); define('GATEWAY_BITPAY', 42);
define('GATEWAY_DWOLLA', 43);
define('EVENT_CREATE_CLIENT', 1); define('EVENT_CREATE_CLIENT', 1);
define('EVENT_CREATE_INVOICE', 2); define('EVENT_CREATE_INVOICE', 2);
@ -383,6 +384,7 @@ define('TOKEN_BILLING_ALWAYS', 4);
define('PAYMENT_TYPE_PAYPAL', 'PAYMENT_TYPE_PAYPAL'); define('PAYMENT_TYPE_PAYPAL', 'PAYMENT_TYPE_PAYPAL');
define('PAYMENT_TYPE_CREDIT_CARD', 'PAYMENT_TYPE_CREDIT_CARD'); define('PAYMENT_TYPE_CREDIT_CARD', 'PAYMENT_TYPE_CREDIT_CARD');
define('PAYMENT_TYPE_BITCOIN', 'PAYMENT_TYPE_BITCOIN'); define('PAYMENT_TYPE_BITCOIN', 'PAYMENT_TYPE_BITCOIN');
define('PAYMENT_TYPE_DWOLLA', 'PAYMENT_TYPE_DWOLLA');
define('PAYMENT_TYPE_TOKEN', 'PAYMENT_TYPE_TOKEN'); define('PAYMENT_TYPE_TOKEN', 'PAYMENT_TYPE_TOKEN');
define('PAYMENT_TYPE_ANY', 'PAYMENT_TYPE_ANY'); define('PAYMENT_TYPE_ANY', 'PAYMENT_TYPE_ANY');

View File

@ -7,6 +7,40 @@ class Gateway extends Eloquent
{ {
public $timestamps = true; public $timestamps = true;
public static $paymentTypes = [
PAYMENT_TYPE_CREDIT_CARD,
PAYMENT_TYPE_PAYPAL,
PAYMENT_TYPE_BITCOIN,
//PAYMENT_TYPE_DWOLLA
];
public static $hiddenFields = [
// PayPal
'headerImageUrl',
'solutionType',
'landingPage',
'brandName',
'logoImageUrl',
'borderColor',
// Dwolla
'gatewaySession',
'purchaseOrder',
'Callback',
'Redirect',
'shipping',
'tax',
'discount',
'notes',
'AllowFundingSources',
'AllowGuestCheckout',
];
public static $optionalFields = [
// PayPal
'testMode',
'developerMode',
];
public function getLogoUrl() public function getLogoUrl()
{ {
return '/images/gateways/logo_'.$this->provider.'.png'; return '/images/gateways/logo_'.$this->provider.'.png';
@ -24,6 +58,8 @@ class Gateway extends Eloquent
$link = 'https://www.2checkout.com/referral?r=2c37ac2298'; $link = 'https://www.2checkout.com/referral?r=2c37ac2298';
} elseif ($this->id == GATEWAY_BITPAY) { } elseif ($this->id == GATEWAY_BITPAY) {
$link = 'https://bitpay.com/dashboard/signup'; $link = 'https://bitpay.com/dashboard/signup';
} elseif ($this->id == GATEWAY_DWOLLA) {
$link = 'https://www.dwolla.com/register';
} }
$key = 'texts.gateway_help_'.$this->id; $key = 'texts.gateway_help_'.$this->id;
@ -42,6 +78,8 @@ class Gateway extends Eloquent
return PAYMENT_TYPE_PAYPAL; return PAYMENT_TYPE_PAYPAL;
} else if ($gatewayId == GATEWAY_BITPAY) { } else if ($gatewayId == GATEWAY_BITPAY) {
return PAYMENT_TYPE_BITCOIN; return PAYMENT_TYPE_BITCOIN;
} else if ($gatewayId == GATEWAY_DWOLLA) {
return PAYMENT_TYPE_DWOLLA;
} else { } else {
return PAYMENT_TYPE_CREDIT_CARD; return PAYMENT_TYPE_CREDIT_CARD;
} }

View File

@ -36,7 +36,8 @@
"omnipay/bitpay": "dev-master", "omnipay/bitpay": "dev-master",
"guzzlehttp/guzzle": "~5.0", "guzzlehttp/guzzle": "~5.0",
"laravelcollective/html": "~5.0", "laravelcollective/html": "~5.0",
"wildbit/laravel-postmark-provider": "dev-master" "wildbit/laravel-postmark-provider": "dev-master",
"mach-kernel/omnipay-dwolla": "dev-master"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "~4.0",

248
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "493811fbf580a8bbd5eb08b10f5bb9d1", "hash": "c3732ac70e554cbab216fc1993487412",
"packages": [ "packages": [
{ {
"name": "alfaproject/omnipay-neteller", "name": "alfaproject/omnipay-neteller",
@ -120,12 +120,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/formers/former.git", "url": "https://github.com/formers/former.git",
"reference": "e37cb69d12d4436282e6754800903d94788528f3" "reference": "5d4dbc7bc98b363946dc59ce63565a2b49f138ca"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/formers/former/zipball/e37cb69d12d4436282e6754800903d94788528f3", "url": "https://api.github.com/repos/formers/former/zipball/5d4dbc7bc98b363946dc59ce63565a2b49f138ca",
"reference": "e37cb69d12d4436282e6754800903d94788528f3", "reference": "5d4dbc7bc98b363946dc59ce63565a2b49f138ca",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -171,7 +171,7 @@
"foundation", "foundation",
"laravel" "laravel"
], ],
"time": "2015-05-06 00:01:16" "time": "2015-05-26 22:05:25"
}, },
{ {
"name": "anahkiasen/html-object", "name": "anahkiasen/html-object",
@ -384,20 +384,20 @@
}, },
{ {
"name": "classpreloader/classpreloader", "name": "classpreloader/classpreloader",
"version": "1.3.0", "version": "1.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/ClassPreloader/ClassPreloader.git", "url": "https://github.com/ClassPreloader/ClassPreloader.git",
"reference": "0544616ba33fb2a6b792b3a7822650810c6d65d9" "reference": "b76f3f4f603ebbe7e64351a7ef973431ddaf7b27"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/0544616ba33fb2a6b792b3a7822650810c6d65d9", "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/b76f3f4f603ebbe7e64351a7ef973431ddaf7b27",
"reference": "0544616ba33fb2a6b792b3a7822650810c6d65d9", "reference": "b76f3f4f603ebbe7e64351a7ef973431ddaf7b27",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"nikic/php-parser": "^1.2.2", "nikic/php-parser": "~1.3",
"php": ">=5.3.3", "php": ">=5.3.3",
"symfony/console": "~2.1", "symfony/console": "~2.1",
"symfony/filesystem": "~2.1", "symfony/filesystem": "~2.1",
@ -412,7 +412,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.3-dev" "dev-master": "1.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -425,13 +425,13 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "graham@mineuk.com"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com" "email": "mtdowling@gmail.com"
},
{
"name": "Graham Campbell",
"email": "graham@cachethq.io"
} }
], ],
"description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case",
@ -440,7 +440,7 @@
"class", "class",
"preload" "preload"
], ],
"time": "2015-04-15 21:59:30" "time": "2015-05-26 10:57:51"
}, },
{ {
"name": "coatesap/omnipay-datacash", "name": "coatesap/omnipay-datacash",
@ -2115,6 +2115,63 @@
], ],
"time": "2015-03-26 11:54:18" "time": "2015-03-26 11:54:18"
}, },
{
"name": "mach-kernel/omnipay-dwolla",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/mach-kernel/omnipay-dwolla.git",
"reference": "cdf228962a28ea1d9d150e33ef25f0e57f157124"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mach-kernel/omnipay-dwolla/zipball/cdf228962a28ea1d9d150e33ef25f0e57f157124",
"reference": "cdf228962a28ea1d9d150e33ef25f0e57f157124",
"shasum": ""
},
"require": {
"omnipay/common": "~2.0"
},
"require-dev": {
"omnipay/tests": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Omnipay\\Dwolla\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Adrian Macneil",
"email": "adrian@adrianmacneil.com"
},
{
"name": "David Stancu",
"homepage": "https://github.com/mach-kernel"
}
],
"description": "Dwolla support for the Omnipay payment library",
"homepage": "https://github.com/mach-kernel/omnipay-dwolla",
"keywords": [
"dwolla",
"gateway",
"merchant",
"omnipay",
"pay",
"payment"
],
"time": "2014-06-10 16:41:50"
},
{ {
"name": "maximebf/debugbar", "name": "maximebf/debugbar",
"version": "v1.10.4", "version": "v1.10.4",
@ -4479,17 +4536,17 @@
}, },
{ {
"name": "symfony/class-loader", "name": "symfony/class-loader",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/ClassLoader", "target-dir": "Symfony/Component/ClassLoader",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/ClassLoader.git", "url": "https://github.com/symfony/ClassLoader.git",
"reference": "695134c9b39559297fa5d1dcff6a9054bb56facb" "reference": "abf5632a31402ae6ac19cd00683faf603046440a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/ClassLoader/zipball/695134c9b39559297fa5d1dcff6a9054bb56facb", "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/abf5632a31402ae6ac19cd00683faf603046440a",
"reference": "695134c9b39559297fa5d1dcff6a9054bb56facb", "reference": "abf5632a31402ae6ac19cd00683faf603046440a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4526,21 +4583,21 @@
], ],
"description": "Symfony ClassLoader Component", "description": "Symfony ClassLoader Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-05-15 13:32:45"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Console", "target-dir": "Symfony/Component/Console",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Console.git", "url": "https://github.com/symfony/Console.git",
"reference": "ebc5679854aa24ed7d65062e9e3ab0b18a917272" "reference": "2343f6d8026306bd330e0c987e4c102483c213e7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/ebc5679854aa24ed7d65062e9e3ab0b18a917272", "url": "https://api.github.com/repos/symfony/Console/zipball/2343f6d8026306bd330e0c987e4c102483c213e7",
"reference": "ebc5679854aa24ed7d65062e9e3ab0b18a917272", "reference": "2343f6d8026306bd330e0c987e4c102483c213e7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4584,21 +4641,21 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-05-22 14:53:08"
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Debug", "target-dir": "Symfony/Component/Debug",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Debug.git", "url": "https://github.com/symfony/Debug.git",
"reference": "ad4511a8fddce7ec163b513ba39a30ea4f32c9e7" "reference": "4851a041c48e76b91a221db84ab5850daa6a7b33"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Debug/zipball/ad4511a8fddce7ec163b513ba39a30ea4f32c9e7", "url": "https://api.github.com/repos/symfony/Debug/zipball/4851a041c48e76b91a221db84ab5850daa6a7b33",
"reference": "ad4511a8fddce7ec163b513ba39a30ea4f32c9e7", "reference": "4851a041c48e76b91a221db84ab5850daa6a7b33",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4645,11 +4702,11 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-08 13:17:44" "time": "2015-05-20 13:09:45"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/EventDispatcher", "target-dir": "Symfony/Component/EventDispatcher",
"source": { "source": {
"type": "git", "type": "git",
@ -4708,17 +4765,17 @@
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Filesystem", "target-dir": "Symfony/Component/Filesystem",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Filesystem.git", "url": "https://github.com/symfony/Filesystem.git",
"reference": "f73904bd2dae525c42ea1f0340c7c98480ecacde" "reference": "1f8429f72a5bfa58b33fd96824bea146fc4b3f49"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/f73904bd2dae525c42ea1f0340c7c98480ecacde", "url": "https://api.github.com/repos/symfony/Filesystem/zipball/1f8429f72a5bfa58b33fd96824bea146fc4b3f49",
"reference": "f73904bd2dae525c42ea1f0340c7c98480ecacde", "reference": "1f8429f72a5bfa58b33fd96824bea146fc4b3f49",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4754,21 +4811,21 @@
], ],
"description": "Symfony Filesystem Component", "description": "Symfony Filesystem Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-08 00:09:07" "time": "2015-05-15 13:32:45"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Finder", "target-dir": "Symfony/Component/Finder",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Finder.git", "url": "https://github.com/symfony/Finder.git",
"reference": "704c64c8b12c8882640d5c0330a8414b1e06dc99" "reference": "ffedd3e0ff8155188155e9322fe21b9ee012ac14"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Finder/zipball/704c64c8b12c8882640d5c0330a8414b1e06dc99", "url": "https://api.github.com/repos/symfony/Finder/zipball/ffedd3e0ff8155188155e9322fe21b9ee012ac14",
"reference": "704c64c8b12c8882640d5c0330a8414b1e06dc99", "reference": "ffedd3e0ff8155188155e9322fe21b9ee012ac14",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4804,21 +4861,21 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-05-15 13:32:45"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/HttpFoundation", "target-dir": "Symfony/Component/HttpFoundation",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/HttpFoundation.git", "url": "https://github.com/symfony/HttpFoundation.git",
"reference": "8a0d00980ef9f6b47ddbf24bdfbf70fead760816" "reference": "f9b28dcc6d3e50f5568b42dda7292656a9fe8432"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/8a0d00980ef9f6b47ddbf24bdfbf70fead760816", "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/f9b28dcc6d3e50f5568b42dda7292656a9fe8432",
"reference": "8a0d00980ef9f6b47ddbf24bdfbf70fead760816", "reference": "f9b28dcc6d3e50f5568b42dda7292656a9fe8432",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4858,21 +4915,21 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-05-22 14:53:08"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/HttpKernel", "target-dir": "Symfony/Component/HttpKernel",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/HttpKernel.git", "url": "https://github.com/symfony/HttpKernel.git",
"reference": "2010194de0a57731af9404c7f97fd300db98b7a3" "reference": "a9a6f595941fce8dddd64f4e9bf47747cf1515fc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/2010194de0a57731af9404c7f97fd300db98b7a3", "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/a9a6f595941fce8dddd64f4e9bf47747cf1515fc",
"reference": "2010194de0a57731af9404c7f97fd300db98b7a3", "reference": "a9a6f595941fce8dddd64f4e9bf47747cf1515fc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4936,21 +4993,21 @@
], ],
"description": "Symfony HttpKernel Component", "description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-11 01:58:49" "time": "2015-05-27 00:17:10"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Process", "target-dir": "Symfony/Component/Process",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Process.git", "url": "https://github.com/symfony/Process.git",
"reference": "9f3c4baaf840ed849e1b1f7bfd5ae246e8509562" "reference": "7856d78ab6cce6e59d02d9e1a873441f6bd21306"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Process/zipball/9f3c4baaf840ed849e1b1f7bfd5ae246e8509562", "url": "https://api.github.com/repos/symfony/Process/zipball/7856d78ab6cce6e59d02d9e1a873441f6bd21306",
"reference": "9f3c4baaf840ed849e1b1f7bfd5ae246e8509562", "reference": "7856d78ab6cce6e59d02d9e1a873441f6bd21306",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4986,21 +5043,21 @@
], ],
"description": "Symfony Process Component", "description": "Symfony Process Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-05-15 13:32:45"
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Routing", "target-dir": "Symfony/Component/Routing",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Routing.git", "url": "https://github.com/symfony/Routing.git",
"reference": "1455ec537940f7428ea6aa9411f3c4bca69413a0" "reference": "dc9df18a1cfe87de65e270e8f01407ca6d7c39cb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/1455ec537940f7428ea6aa9411f3c4bca69413a0", "url": "https://api.github.com/repos/symfony/Routing/zipball/dc9df18a1cfe87de65e270e8f01407ca6d7c39cb",
"reference": "1455ec537940f7428ea6aa9411f3c4bca69413a0", "reference": "dc9df18a1cfe87de65e270e8f01407ca6d7c39cb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5055,21 +5112,21 @@
"uri", "uri",
"url" "url"
], ],
"time": "2015-05-02 15:18:45" "time": "2015-05-15 13:32:45"
}, },
{ {
"name": "symfony/security-core", "name": "symfony/security-core",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Security/Core", "target-dir": "Symfony/Component/Security/Core",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/security-core.git", "url": "https://github.com/symfony/security-core.git",
"reference": "d25c17db741f58c0f615e52006a47f6fb23cd9b3" "reference": "1ad0ee4b2a1ab32924cd0be397f0196b5d47e5d0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/security-core/zipball/d25c17db741f58c0f615e52006a47f6fb23cd9b3", "url": "https://api.github.com/repos/symfony/security-core/zipball/1ad0ee4b2a1ab32924cd0be397f0196b5d47e5d0",
"reference": "d25c17db741f58c0f615e52006a47f6fb23cd9b3", "reference": "1ad0ee4b2a1ab32924cd0be397f0196b5d47e5d0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5108,32 +5165,32 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{ {
"name": "Fabien Potencier", "name": "Fabien Potencier",
"email": "fabien@symfony.com" "email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
} }
], ],
"description": "Symfony Security Component - Core Library", "description": "Symfony Security Component - Core Library",
"homepage": "http://symfony.com", "homepage": "https://symfony.com",
"time": "2015-03-30 15:54:10" "time": "2015-05-15 13:53:19"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Translation", "target-dir": "Symfony/Component/Translation",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Translation.git", "url": "https://github.com/symfony/Translation.git",
"reference": "398e0eedcb89243ad34a10d079a4b6ea4c0b61ff" "reference": "d030b3d8d9699795dbf8c59e915ef879007a4483"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Translation/zipball/398e0eedcb89243ad34a10d079a4b6ea4c0b61ff", "url": "https://api.github.com/repos/symfony/Translation/zipball/d030b3d8d9699795dbf8c59e915ef879007a4483",
"reference": "398e0eedcb89243ad34a10d079a4b6ea4c0b61ff", "reference": "d030b3d8d9699795dbf8c59e915ef879007a4483",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5178,11 +5235,11 @@
], ],
"description": "Symfony Translation Component", "description": "Symfony Translation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2015-05-05 16:51:00" "time": "2015-05-22 14:37:51"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/VarDumper", "target-dir": "Symfony/Component/VarDumper",
"source": { "source": {
"type": "git", "type": "git",
@ -5698,16 +5755,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "2.0.16", "version": "2.0.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "934fd03eb6840508231a7f73eb8940cf32c3b66c" "reference": "c4e8e7725e351184a76544634855b8a9c405a6e3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/934fd03eb6840508231a7f73eb8940cf32c3b66c", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c4e8e7725e351184a76544634855b8a9c405a6e3",
"reference": "934fd03eb6840508231a7f73eb8940cf32c3b66c", "reference": "c4e8e7725e351184a76544634855b8a9c405a6e3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5756,7 +5813,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2015-04-11 04:35:00" "time": "2015-05-25 05:11:59"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -5944,16 +6001,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "4.6.6", "version": "4.6.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "3afe303d873a4d64c62ef84de491b97b006fbdac" "reference": "a6cd74b523ef7bad7a23a94e4045d72968e8165b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3afe303d873a4d64c62ef84de491b97b006fbdac", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6cd74b523ef7bad7a23a94e4045d72968e8165b",
"reference": "3afe303d873a4d64c62ef84de491b97b006fbdac", "reference": "a6cd74b523ef7bad7a23a94e4045d72968e8165b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6012,20 +6069,20 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2015-04-29 15:18:52" "time": "2015-05-28 09:54:11"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
"version": "2.3.1", "version": "2.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "74ffb87f527f24616f72460e54b595f508dccb5c" "reference": "787e06820578ca103b21e323e27f0e2eb0712ae5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/787e06820578ca103b21e323e27f0e2eb0712ae5",
"reference": "74ffb87f527f24616f72460e54b595f508dccb5c", "reference": "787e06820578ca103b21e323e27f0e2eb0712ae5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6067,7 +6124,7 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2015-04-02 05:36:41" "time": "2015-05-28 09:50:37"
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
@ -6442,7 +6499,7 @@
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v2.6.7", "version": "v2.6.8",
"target-dir": "Symfony/Component/Yaml", "target-dir": "Symfony/Component/Yaml",
"source": { "source": {
"type": "git", "type": "git",
@ -6502,7 +6559,8 @@
"alfaproject/omnipay-neteller": 20, "alfaproject/omnipay-neteller": 20,
"alfaproject/omnipay-skrill": 20, "alfaproject/omnipay-skrill": 20,
"omnipay/bitpay": 20, "omnipay/bitpay": 20,
"wildbit/laravel-postmark-provider": 20 "wildbit/laravel-postmark-provider": 20,
"mach-kernel/omnipay-dwolla": 20
}, },
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,

View File

@ -25,6 +25,7 @@ class PaymentLibrariesSeeder extends Seeder
['name' => 'Sisow', 'provider' => 'Sisow', 'payment_library_id' => 1], ['name' => 'Sisow', 'provider' => 'Sisow', 'payment_library_id' => 1],
['name' => 'Skrill', 'provider' => 'Skrill', 'payment_library_id' => 1], ['name' => 'Skrill', 'provider' => 'Skrill', 'payment_library_id' => 1],
['name' => 'BitPay', 'provider' => 'BitPay', 'payment_library_id' => 1], ['name' => 'BitPay', 'provider' => 'BitPay', 'payment_library_id' => 1],
['name' => 'Dwolla', 'provider' => 'Dwolla', 'payment_library_id' => 1],
]; ];
foreach ($gateways as $gateway) foreach ($gateways as $gateway)

View File

@ -3204,6 +3204,12 @@ div.checkbox > label {
border-radius: 3px; border-radius: 3px;
} }
.container input:focus,
.container textarea:focus,
.container select:focus {
background: #fff !important;
}
.container input[placeholder], .container input[placeholder],
.container textarea[placeholder], .container textarea[placeholder],
.container select[placeholder] { .container select[placeholder] {

View File

@ -820,6 +820,12 @@ div.checkbox > label {
border-radius: 3px; border-radius: 3px;
} }
.container input:focus,
.container textarea:focus,
.container select:focus {
background: #fff !important;
}
.container input[placeholder], .container input[placeholder],
.container textarea[placeholder], .container textarea[placeholder],
.container select[placeholder] { .container select[placeholder] {

View File

@ -19,8 +19,9 @@ Developed by [@hillelcoren](https://twitter.com/hillelcoren) | Designed by [kant
* Live PDF generation * Live PDF generation
* Integrates with 30+ payment providers * Integrates with 30+ payment providers
* Recurring invoices * Recurring invoices
* Tax rates and payment terms * Tasks with time-tracking
* Multi-user support * Multi-user support
* Tax rates and payment terms
* Partial payments * Partial payments
* Custom email templates * Custom email templates
* [Zapier](https://zapier.com/) integration * [Zapier](https://zapier.com/) integration

View File

@ -135,8 +135,8 @@ return array(
'filter' => 'Filter', 'filter' => 'Filter',
'new_client' => 'New Client', 'new_client' => 'New Client',
'new_invoice' => 'New Invoice', 'new_invoice' => 'New Invoice',
'new_payment' => 'New Payment', 'new_payment' => 'Enter Payment',
'new_credit' => 'New Credit', 'new_credit' => 'Enter Credit',
'contact' => 'Contact', 'contact' => 'Contact',
'date_created' => 'Date Created', 'date_created' => 'Date Created',
'last_login' => 'Last Login', 'last_login' => 'Last Login',
@ -671,5 +671,7 @@ return array(
'prefix' => 'Prefix', 'prefix' => 'Prefix',
'counter' => 'Counter', 'counter' => 'Counter',
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
); );

View File

@ -19,7 +19,7 @@
{!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!} {!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!}
@if ($config) @if ($config)
@foreach ($accountGateway->fields as $field => $junk) @foreach ($accountGateway->fields as $field => $junk)
@if (in_array($field, ['solutionType', 'landingPage', 'headerImageUrl', 'brandName'])) @if (in_array($field, $hiddenFields))
{{-- do nothing --}} {{-- do nothing --}}
@elseif (isset($config->$field)) @elseif (isset($config->$field))
{{ Former::populateField($accountGateway->gateway_id.'_'.$field, $config->$field) }} {{ Former::populateField($accountGateway->gateway_id.'_'.$field, $config->$field) }}
@ -46,9 +46,11 @@
<div id="gateway_{{ $gateway->id }}_div" class='gateway-fields' style="display: none"> <div id="gateway_{{ $gateway->id }}_div" class='gateway-fields' style="display: none">
@foreach ($gateway->fields as $field => $details) @foreach ($gateway->fields as $field => $details)
@if (in_array($field, ['solutionType', 'landingPage', 'headerImageUrl', 'brandName'])) @if (in_array($field, $hiddenFields))
{{-- do nothing --}} {{-- do nothing --}}
@elseif ($field == 'testMode' || $field == 'developerMode') @elseif ($gateway->id == GATEWAY_DWOLLA && ($field == 'Key' || $field == 'Secret'))
{{-- do nothing --}}
@elseif ($field == 'testMode' || $field == 'developerMode' || $field == 'sandbox')
{!! Former::checkbox($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field))->text('Enable')->value('true') !!} {!! Former::checkbox($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field))->text('Enable')->value('true') !!}
@elseif ($field == 'username' || $field == 'password') @elseif ($field == 'username' || $field == 'password')
{!! Former::text($gateway->id.'_'.$field)->label('API '. ucfirst(Utils::toSpaceCase($field))) !!} {!! Former::text($gateway->id.'_'.$field)->label('API '. ucfirst(Utils::toSpaceCase($field))) !!}
@ -104,6 +106,8 @@
if (val == 'PAYMENT_TYPE_PAYPAL') { if (val == 'PAYMENT_TYPE_PAYPAL') {
setFieldsShown({{ GATEWAY_PAYPAL_EXPRESS }}); setFieldsShown({{ GATEWAY_PAYPAL_EXPRESS }});
} else if (val == 'PAYMENT_TYPE_DWOLLA') {
setFieldsShown({{ GATEWAY_DWOLLA }});
} else { } else {
setFieldsShown({{ GATEWAY_BITPAY }}); setFieldsShown({{ GATEWAY_BITPAY }});
} }

View File

@ -25,7 +25,7 @@
] ]
)->split() !!} )->split() !!}
{!! DropdownButton::primary(trans('texts.create_invoice')) {!! DropdownButton::primary(trans('texts.new_invoice'))
->withAttributes(['class'=>'primaryDropDown']) ->withAttributes(['class'=>'primaryDropDown'])
->withContents($actionLinks)->split() !!} ->withContents($actionLinks)->split() !!}
@endif @endif

View File

@ -83,6 +83,7 @@
url = '/track' + url.replace('http:/', ''); url = '/track' + url.replace('http:/', '');
dataLayer.push({'event':url, 'eventLabel':this.src}); dataLayer.push({'event':url, 'eventLabel':this.src});
} }
function trackEvent(category, action) {}
</script> </script>
@elseif (isset($_ENV['ANALYTICS_KEY']) && $_ENV['ANALYTICS_KEY']) @elseif (isset($_ENV['ANALYTICS_KEY']) && $_ENV['ANALYTICS_KEY'])
<script> <script>
@ -97,12 +98,17 @@
function trackUrl(url) { function trackUrl(url) {
url = '/track' + url.replace('http:/', ''); url = '/track' + url.replace('http:/', '');
ga('send', 'pageview', url); ga('send', 'pageview', url);
//ga('send', 'event', 'photo', 'hover', this.src);
}
function trackEvent(category, action) {
ga('send', 'event', category, action, this.src);
} }
</script> </script>
@else @else
<script> <script>
function trackUrl(url) {} function trackUrl(url) {}
function trackEvent(category, action) {}
</script> </script>
@endif @endif