diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index b80a59b86450..45500006703c 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -153,7 +153,7 @@ class AccountController extends BaseController if ($count == 0) { return Redirect::to('gateways/create'); } else { - return View::make('accounts.payments', ['showAdd' => $count < 2]); + return View::make('accounts.payments', ['showAdd' => $count < 3]); } } elseif ($section == ACCOUNT_NOTIFICATIONS) { $data = [ diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php index 489b2fb2d65c..cce6922350cb 100644 --- a/app/Http/Controllers/AccountGatewayController.php +++ b/app/Http/Controllers/AccountGatewayController.php @@ -25,10 +25,11 @@ class AccountGatewayController extends BaseController ->join('gateways', 'gateways.id', '=', 'account_gateways.gateway_id') ->where('account_gateways.deleted_at', '=', null) ->where('account_gateways.account_id', '=', Auth::user()->account_id) - ->select('account_gateways.public_id', 'gateways.name', 'account_gateways.deleted_at'); + ->select('account_gateways.public_id', 'gateways.name', 'account_gateways.deleted_at', 'account_gateways.gateway_id'); return Datatable::query($query) ->addColumn('name', function ($model) { return link_to('gateways/'.$model->public_id.'/edit', $model->name); }) + ->addColumn('payment_type', function ($model) { return Gateway::getPrettyPaymentType($model->gateway_id); }) ->addColumn('dropdown', function ($model) { $actions = '
', $response->getMessage()); + return Redirect::to('view/'.$invitationKey); } } + + if ($response->isSuccessful()) { + $payment = self::createPayment($invitation, $ref); + Session::flash('message', trans('texts.applied_payment')); + + return Redirect::to('view/'.$payment->invitation->invitation_key); + } elseif ($response->isRedirect()) { + $invitation->transaction_reference = $ref; + $invitation->save(); + + Session::save(); + $response->redirect(); + } else { + Session::flash('error', $response->getMessage()); + + return Utils::fatalError('Sorry, there was an error processing your payment. Please try again later.
', $response->getMessage()); + } } catch (\Exception $e) { $errorMessage = trans('texts.payment_error'); Session::flash('error', $errorMessage."
".$e->getMessage()); diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index b6418f659307..50eebe347811 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -10,7 +10,7 @@ use Cache; use Session; use Event; use App\Models\Language; - +use App\Events\UserSettingsChanged; class StartupCheck { diff --git a/app/Http/routes.php b/app/Http/routes.php index 34db3d575bef..5499f2c3537a 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -36,7 +36,7 @@ Route::post('get_started', 'AccountController@getStarted'); // Client visible pages Route::get('view/{invitation_key}', 'InvoiceController@view'); Route::get('approve/{invitation_key}', 'QuoteController@approve'); -Route::get('payment/{invitation_key}', 'PaymentController@show_payment'); +Route::get('payment/{invitation_key}/{payment_type?}', 'PaymentController@show_payment'); Route::post('payment/{invitation_key}', 'PaymentController@do_payment'); Route::get('complete', 'PaymentController@offsite_payment'); Route::get('client/quotes', 'QuoteController@clientIndex'); @@ -336,6 +336,7 @@ define('GATEWAY_TWO_CHECKOUT', 27); define('GATEWAY_BEANSTREAM', 29); define('GATEWAY_PSIGATE', 30); define('GATEWAY_MOOLAH', 31); +define('GATEWAY_BITPAY', 42); define('EVENT_CREATE_CLIENT', 1); define('EVENT_CREATE_INVOICE', 2); @@ -378,6 +379,8 @@ define('TOKEN_BILLING_ALWAYS', 4); define('PAYMENT_TYPE_PAYPAL', 'PAYMENT_TYPE_PAYPAL'); define('PAYMENT_TYPE_CREDIT_CARD', 'PAYMENT_TYPE_CREDIT_CARD'); +define('PAYMENT_TYPE_BITCOIN', 'PAYMENT_TYPE_BITCOIN'); +define('PAYMENT_TYPE_TOKEN', 'PAYMENT_TYPE_TOKEN'); define('PAYMENT_TYPE_ANY', 'PAYMENT_TYPE_ANY'); /* diff --git a/app/Listeners/HandleInvoicePaid.php b/app/Listeners/HandleInvoicePaid.php index 159b001abad4..d072abd00357 100644 --- a/app/Listeners/HandleInvoicePaid.php +++ b/app/Listeners/HandleInvoicePaid.php @@ -31,8 +31,10 @@ class HandleInvoicePaid { */ public function handle(InvoicePaid $event) { - $this->contactMailer->sendPaymentConfirmation($payment); + $payment = $event->payment; $invoice = $payment->invoice; + + $this->contactMailer->sendPaymentConfirmation($payment); foreach ($invoice->account->users as $user) { diff --git a/app/Models/Account.php b/app/Models/Account.php index ff896e30779e..42c0ec54d63a 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -113,9 +113,7 @@ class Account extends Eloquent foreach ($this->account_gateways as $gateway) { if (!$type || $type == PAYMENT_TYPE_ANY) { return $gateway; - } elseif ($gateway->isPayPal() && $type == PAYMENT_TYPE_PAYPAL) { - return $gateway; - } elseif (!$gateway->isPayPal() && $type == PAYMENT_TYPE_CREDIT_CARD) { + } elseif ($gateway->isPaymentType($type)) { return $gateway; } } diff --git a/app/Models/AccountGateway.php b/app/Models/AccountGateway.php index c7f008fb67f8..62c3456473ce 100644 --- a/app/Models/AccountGateway.php +++ b/app/Models/AccountGateway.php @@ -1,5 +1,6 @@ gateway_id == GATEWAY_PAYPAL_EXPRESS; + public function getPaymentType() { + return Gateway::getPaymentType($this->gateway_id); + } + + public function isPaymentType($type) { + return $this->getPaymentType() == $type; } } diff --git a/app/Models/Gateway.php b/app/Models/Gateway.php index cb275e23e826..d0b4bd847972 100644 --- a/app/Models/Gateway.php +++ b/app/Models/Gateway.php @@ -7,11 +7,6 @@ class Gateway extends Eloquent { public $timestamps = true; - public function paymentlibrary() - { - return $this->belongsTo('\App\Models\PaymentLibrary', 'payment_library_id'); - } - public function getLogoUrl() { return '/images/gateways/logo_'.$this->provider.'.png'; @@ -37,18 +32,20 @@ class Gateway extends Eloquent public function getFields() { - $paymentLibrary = $this->paymentlibrary; + return Omnipay::create($this->provider)->getDefaultParameters(); + } - if ($paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY) { - $fields = Omnipay::create($this->provider)->getDefaultParameters(); + public static function getPaymentType($gatewayId) { + if ($gatewayId == GATEWAY_PAYPAL_EXPRESS) { + return PAYMENT_TYPE_PAYPAL; + } else if ($gatewayId == GATEWAY_BITPAY) { + return PAYMENT_TYPE_BITCOIN; } else { - $fields = Payment_Utility::load('config', 'drivers/'.strtolower($this->provider)); + return PAYMENT_TYPE_CREDIT_CARD; } + } - if ($fields == null) { - $fields = array(); - } - - return $fields; + public static function getPrettyPaymentType($gatewayId) { + return trans('texts.' . strtolower(Gateway::getPaymentType($gatewayId))); } } diff --git a/composer.json b/composer.json index cacff91bee1d..08c769297bbb 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,8 @@ "coatesap/omnipay-realex": "~2.0", "fruitcakestudio/omnipay-sisow": "~2.0", "alfaproject/omnipay-skrill": "dev-master", - "illuminate/html": "5.*" + "illuminate/html": "5.*", + "omnipay/bitpay": "dev-master" }, "require-dev": { "phpunit/phpunit": "~4.0", diff --git a/composer.lock b/composer.lock index 3cabdcd419af..d1ea10533e32 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "f464570c808999ffcb0fa78193b13229", + "hash": "4093891914bbd46ffab78737da36898a", "packages": [ { "name": "alfaproject/omnipay-neteller", @@ -2346,6 +2346,64 @@ ], "time": "2015-01-19 19:06:04" }, + { + "name": "omnipay/bitpay", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/omnipay-bitpay.git", + "reference": "e659f0e993c586cb36acafaf50835570b4a16eb2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/omnipay-bitpay/zipball/e659f0e993c586cb36acafaf50835570b4a16eb2", + "reference": "e659f0e993c586cb36acafaf50835570b4a16eb2", + "shasum": "" + }, + "require": { + "omnipay/common": "~2.0" + }, + "require-dev": { + "omnipay/tests": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Omnipay\\BitPay\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrian Macneil", + "email": "adrian@adrianmacneil.com" + }, + { + "name": "Omnipay Contributors", + "homepage": "https://github.com/thephpleague/omnipay-bitpay/contributors" + } + ], + "description": "BitPay driver for the Omnipay payment processing library", + "homepage": "https://github.com/thephpleague/omnipay-bitpay", + "keywords": [ + "bitcoin", + "bitpay", + "gateway", + "merchant", + "omnipay", + "pay", + "payment" + ], + "time": "2015-03-23 14:18:26" + }, { "name": "omnipay/buckaroo", "version": "v2.0.1", @@ -3730,16 +3788,16 @@ }, { "name": "omnipay/stripe", - "version": "v2.2.0", + "version": "v2.2.1", "source": { "type": "git", "url": "https://github.com/thephpleague/omnipay-stripe.git", - "reference": "b3ed1028bb72837905012311fa74259d9ed8ba3c" + "reference": "906377e50045dc2ba9c612aa1f6924157e1f750e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-stripe/zipball/b3ed1028bb72837905012311fa74259d9ed8ba3c", - "reference": "b3ed1028bb72837905012311fa74259d9ed8ba3c", + "url": "https://api.github.com/repos/thephpleague/omnipay-stripe/zipball/906377e50045dc2ba9c612aa1f6924157e1f750e", + "reference": "906377e50045dc2ba9c612aa1f6924157e1f750e", "shasum": "" }, "require": { @@ -3783,7 +3841,7 @@ "payment", "stripe" ], - "time": "2015-03-16 19:24:07" + "time": "2015-04-14 18:55:56" }, { "name": "omnipay/targetpay", @@ -6115,7 +6173,8 @@ "webpatser/laravel-countries": 20, "lokielse/omnipay-alipay": 20, "alfaproject/omnipay-neteller": 20, - "alfaproject/omnipay-skrill": 20 + "alfaproject/omnipay-skrill": 20, + "omnipay/bitpay": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/database/seeds/PaymentLibrariesSeeder.php b/database/seeds/PaymentLibrariesSeeder.php index d676ea97058a..73b8090c73be 100644 --- a/database/seeds/PaymentLibrariesSeeder.php +++ b/database/seeds/PaymentLibrariesSeeder.php @@ -22,7 +22,8 @@ class PaymentLibrariesSeeder extends Seeder ['name' => 'PaymentSense', 'provider' => 'PaymentSense', 'payment_library_id' => 1], ['name' => 'Realex', 'provider' => 'Realex_Remote', '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], ]; foreach ($gateways as $gateway) diff --git a/resources/lang/da/texts.php b/resources/lang/da/texts.php index 20c38f824130..6907426d44ba 100644 --- a/resources/lang/da/texts.php +++ b/resources/lang/da/texts.php @@ -586,5 +586,10 @@ return array( 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', + + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', ); diff --git a/resources/lang/de/texts.php b/resources/lang/de/texts.php index ecaa04865c76..9cb8632a7a8d 100644 --- a/resources/lang/de/texts.php +++ b/resources/lang/de/texts.php @@ -577,4 +577,11 @@ return array( 'notification_quote_approved' => 'Der folgende Kunde :client nahm das Angebot :invoice über :amount an.', 'resend_confirmation' => 'Bestätigungsmail erneut senden', 'confirmation_resent' => 'Bestätigungsemail wurde erneut gesendet', + + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', + + ); \ No newline at end of file diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 823e76d13883..58015e6e3b43 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -173,7 +173,7 @@ return array( 'are_you_sure' => 'Are you sure?', // payment pages - 'payment_type_id' => 'Payment type', + 'payment_type_id' => 'Payment Type', 'amount' => 'Amount', // account/company pages @@ -187,7 +187,7 @@ return array( 'remove_logo' => 'Remove logo', 'logo_help' => 'Supported: JPEG, GIF and PNG. Recommended size: 200px width by 120px height', 'payment_gateway' => 'Payment Gateway', - 'gateway_id' => 'Provider', + 'gateway_id' => 'Gateway', 'email_notifications' => 'Email Notifications', 'email_sent' => 'Email me when an invoice is sent', 'email_viewed' => 'Email me when an invoice is viewed', @@ -585,5 +585,9 @@ return array( 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', - + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', + ); diff --git a/resources/lang/es/texts.php b/resources/lang/es/texts.php index eb26690bf8da..da6b5c39de9c 100644 --- a/resources/lang/es/texts.php +++ b/resources/lang/es/texts.php @@ -556,7 +556,12 @@ return array( 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', - + + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', + ); \ No newline at end of file diff --git a/resources/lang/es_ES/texts.php b/resources/lang/es_ES/texts.php index f002c5cb4f41..1b8467fee0be 100644 --- a/resources/lang/es_ES/texts.php +++ b/resources/lang/es_ES/texts.php @@ -580,5 +580,16 @@ return array( 'Whoops, looks like something went wrong.' => 'Vaya, parece que algo salió mal', 'Sorry, the page you are looking for could not be found.' => 'Lo sentimos, la página que está buscando no se pudo encontrar.', + 'email_approved' => 'Email me when a quote is approved', + 'notification_quote_approved_subject' => 'Quote :invoice was approved by :client', + 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', + 'resend_confirmation' => 'Resend confirmation email', + 'confirmation_resent' => 'The confirmation email was resent', + + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', + ); \ No newline at end of file diff --git a/resources/lang/fr/texts.php b/resources/lang/fr/texts.php index 3de369f585cc..df5eeacb6f24 100644 --- a/resources/lang/fr/texts.php +++ b/resources/lang/fr/texts.php @@ -578,5 +578,10 @@ return array( 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', + ); \ No newline at end of file diff --git a/resources/lang/it/texts.php b/resources/lang/it/texts.php index 271fbf6c931b..d1dfb403009f 100644 --- a/resources/lang/it/texts.php +++ b/resources/lang/it/texts.php @@ -580,5 +580,10 @@ return array( 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', + ); diff --git a/resources/lang/lt/texts.php b/resources/lang/lt/texts.php index f146689e9a0f..dcf32ef564d6 100644 --- a/resources/lang/lt/texts.php +++ b/resources/lang/lt/texts.php @@ -587,6 +587,11 @@ return array( 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', + + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', diff --git a/resources/lang/nb_NO/texts.php b/resources/lang/nb_NO/texts.php index 36ea3d406659..e707c3833612 100644 --- a/resources/lang/nb_NO/texts.php +++ b/resources/lang/nb_NO/texts.php @@ -586,5 +586,10 @@ return array( 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', + ); \ No newline at end of file diff --git a/resources/lang/nl/texts.php b/resources/lang/nl/texts.php index 433da85070b9..eb8dfde7acb7 100644 --- a/resources/lang/nl/texts.php +++ b/resources/lang/nl/texts.php @@ -580,6 +580,11 @@ return array( 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', + + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', diff --git a/resources/lang/pt_BR/texts.php b/resources/lang/pt_BR/texts.php index 328ee77f8aa5..355f2766e694 100644 --- a/resources/lang/pt_BR/texts.php +++ b/resources/lang/pt_BR/texts.php @@ -580,6 +580,11 @@ return array( 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', + + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', ); diff --git a/resources/lang/sv/texts.php b/resources/lang/sv/texts.php index acea328b30a6..617af813dda2 100644 --- a/resources/lang/sv/texts.php +++ b/resources/lang/sv/texts.php @@ -583,6 +583,11 @@ return array( 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', + + 'gateway_help_42' => 'Note: use a BitPay Legacy API Key, not an API token.', + 'payment_type_credit_card' => 'Credit card', + 'payment_type_paypal' => 'PayPal', + 'payment_type_bitcoin' => 'Bitcoin', ); diff --git a/resources/views/accounts/account_gateway.blade.php b/resources/views/accounts/account_gateway.blade.php index 8bc3a53b1632..a30f8af7f469 100644 --- a/resources/views/accounts/account_gateway.blade.php +++ b/resources/views/accounts/account_gateway.blade.php @@ -9,8 +9,9 @@ {!! Former::legend($title) !!} @if ($accountGateway) + {!! Former::populateField('payment_type_id', $paymentTypeId) !!} {!! Former::populateField('gateway_id', $accountGateway->gateway_id) !!} - {!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!} + {!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!} @if ($config) @foreach ($accountGateway->fields as $field => $junk) @if (in_array($field, ['solutionType', 'landingPage', 'headerImageUrl', 'brandName'])) @@ -21,12 +22,17 @@ @endforeach @endif @endif - - - {!! Former::select('gateway_id')->label('Select Gateway')->addOption('', '') + + {!! Former::select('payment_type_id') + ->options($paymentTypes) + ->addGroupClass('payment-type-option') + ->onchange('setPaymentType()') !!} + + {!! Former::select('gateway_id')->addOption('', '') ->dataClass('gateway-dropdown') - ->fromQuery($gateways, 'name', 'id') - ->onchange('setFieldsShown()'); !!} + ->addGroupClass('gateway-option') + ->fromQuery($selectGateways, 'name', 'id') + ->onchange('setFieldsShown()') !!} @foreach ($gateways as $gateway) @@ -61,8 +67,11 @@ @endforeach - {!! Former::checkboxes('creditCardTypes[]')->label('Accepted Credit Cards') - ->checkboxes($creditCardTypes)->class('creditcard-types') + {!! Former::checkboxes('creditCardTypes[]') + ->label('Accepted Credit Cards') + ->checkboxes($creditCardTypes) + ->class('creditcard-types') + ->addGroupClass('gateway-option') !!} @@ -76,8 +85,27 @@ @stop \ No newline at end of file diff --git a/resources/views/accounts/payments.blade.php b/resources/views/accounts/payments.blade.php index ce367f98962b..b78fd38e8a4c 100644 --- a/resources/views/accounts/payments.blade.php +++ b/resources/views/accounts/payments.blade.php @@ -16,20 +16,20 @@ {!! Button::success(trans('texts.add_gateway')) ->asLinkTo('/gateways/create') ->withAttributes(['class' => 'pull-right']) - ->appendIcon(Icon::create('plus-sign')) - ->large() !!} + ->appendIcon(Icon::create('plus-sign')) !!} @endif {!! Datatable::table() ->addColumn( trans('texts.name'), + trans('texts.payment_type_id'), trans('texts.action')) ->setUrl(url('api/gateways/')) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('bAutoWidth', false) - ->setOptions('aoColumns', [[ "sWidth"=> "80%" ], ["sWidth"=> "20%"]]) - ->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[1]]]) + ->setOptions('aoColumns', [[ "sWidth"=> "50%" ], [ "sWidth"=> "30%" ], ["sWidth"=> "20%"]]) + ->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[2]]]) ->render('datatable') !!}