Removed migs and coinbase as default payment gateways

Going forward Attendize will only support Stripe and Paypal as defaults. In future we will add instructions on customising Attendize with your own payment gateway.
This commit is contained in:
Jeremy Quinton 2018-08-16 15:50:12 +02:00
parent 8d51cd348f
commit ac5ff98f61
4 changed files with 30 additions and 94 deletions

View File

@ -372,7 +372,6 @@ class EventCheckoutController extends Controller
];
break;
case config('attendize.payment_gateway_paypal'):
case config('attendize.payment_gateway_coinbase'):
$transaction_data += [
'cancelUrl' => route('showEventCheckoutPaymentReturn', [
@ -394,20 +393,6 @@ class EventCheckoutController extends Controller
'token' => $token,
'receipt_email' => $request->get('order_email'),
];
break;
case config('attendize.payment_gateway_migs'):
$transaction_data += [
'transactionId' => $event_id . date('YmdHis'), // TODO: Where to generate transaction id?
'returnUrl' => route('showEventCheckoutPaymentReturn', [
'event_id' => $event_id,
'is_payment_successful' => 1
]),
];
// Order description in MIGS is only 34 characters long; so we need a short description
$transaction_data['description'] = "Ticket sales " . $transaction_data['transactionId'];
break;
default:
Log::error('No payment gateway configured.');

View File

@ -11,8 +11,6 @@ return [
'payment_gateway_dummy' => 0,
'payment_gateway_stripe' => 1,
'payment_gateway_paypal' => 2,
'payment_gateway_coinbase' => 3,
'payment_gateway_migs' => 4,
'fake_card_data' => [
'number' => '4242424242424242',
'expiryMonth' => '6',

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use App\Models\PaymentGateway;
class DropCoinbaseAndMigsAsDefaults extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
PaymentGateway::where('name', 'Coinbase')->delete();
PaymentGateway::where('name', 'Migs_ThreeParty')->delete();
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@ -77,83 +77,6 @@
</section>
{{--BitPay--}}
<section class="payment_gateway_options" id="gateway_{{config('attendize.payment_gateway_bitpay')}}">
<h4>@lang("ManageAccount.bitpay_settings")</h4>
<div class="row">
<div class="col-md-12">
<div class="form-group">
{!! Form::label('bitpay[apiKey]', trans("ManageAccount.bitpay_api_key"), array('class'=>'control-label ')) !!}
{!! Form::text('bitpay[apiKey]', $account->getGatewayConfigVal(config('attendize.payment_gateway_bitpay'), 'apiKey'),[ 'class'=>'form-control']) !!}
</div>
</div>
</div>
</section>
{{--Coinbase--}}
<section class="payment_gateway_options" id="gateway_{{config('attendize.payment_gateway_coinbase')}}">
<h4>@lang("ManageAccount.coinbase_settings")</h4>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{!! Form::label('coinbase[apiKey]', trans("ManageAccount.api_key"), array('class'=>'control-label ')) !!}
{!! Form::text('coinbase[apiKey]', $account->getGatewayConfigVal(config('attendize.payment_gateway_coinbase'), 'apiKey'),[ 'class'=>'form-control']) !!}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{!! Form::label('coinbase[secret]', trans("ManageAccount.secret_code"), ['class'=>'control-label ']) !!}
{!! Form::text('coinbase[secret]', $account->getGatewayConfigVal(config('attendize.payment_gateway_coinbase'), 'secret'),[ 'class'=>'form-control']) !!}
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
{!! Form::label('coinbase[accountId]', trans("ManageAccount.account_id"), array('class'=>'control-label ')) !!}
{!! Form::text('coinbase[accountId]', $account->getGatewayConfigVal(config('attendize.payment_gateway_coinbase'), 'accountId'),[ 'class'=>'form-control']) !!}
</div>
</div>
</div>
</section>
{{--BDO MIGS--}}
<section class="payment_gateway_options" id="gateway_{{config('attendize.payment_gateway_migs')}}">
<h4>@lang("ManageAccount.mastercard_internet_gateway_service_settings")</h4>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{!! Form::label('migs[merchantAccessCode]', trans("ManageAccount.merchant_access_code"), array('class'=>'control-label ')) !!}
{!! Form::text('migs[merchantAccessCode]', $account->getGatewayConfigVal(config('attendize.payment_gateway_migs'), 'merchantAccessCode'),[ 'class'=>'form-control']) !!}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{!! Form::label('migs[merchantId]', trans("ManageAccount.merchant_id"), ['class'=>'control-label ']) !!}
{!! Form::text('migs[merchantId]', $account->getGatewayConfigVal(config('attendize.payment_gateway_migs'), 'merchantId'),[ 'class'=>'form-control']) !!}
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
{!! Form::label('migs[secureHash]', trans("ManageAccount.secure_hash_code"), array('class'=>'control-label ')) !!}
{!! Form::text('migs[secureHash]', $account->getGatewayConfigVal(config('attendize.payment_gateway_migs'), 'secureHash'),[ 'class'=>'form-control']) !!}
</div>
</div>
</div>
</section>
<div class="row">
<div class="col-md-12">
<div class="panel-footer">