v2 first commit
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PaypalStandard\Listeners;
|
||||
|
||||
use App\Events\PaymentGatewayListing;
|
||||
|
||||
class Gateway
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param PaymentGatewayListing $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(PaymentGatewayListing $event)
|
||||
{
|
||||
$setting = setting('paypalstandard');
|
||||
|
||||
$setting['code'] = 'paypalstandard';
|
||||
|
||||
return [$setting];
|
||||
}
|
||||
}
|
23
modules/PaypalStandard/Listeners/ShowPaymentMethod.php
Normal file
23
modules/PaypalStandard/Listeners/ShowPaymentMethod.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PaypalStandard\Listeners;
|
||||
|
||||
use App\Events\Module\PaymentMethodShowing as Event;
|
||||
|
||||
class ShowPaymentMethod
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param Event $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
$method = setting('paypal-standard');
|
||||
|
||||
$method['code'] = 'paypal-standard';
|
||||
|
||||
$event->modules->payment_methods[] = $method;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user