Skip to content

Instantly share code, notes, and snippets.

@akmalhazim
Created May 19, 2019 01:03
Show Gist options
  • Save akmalhazim/784d55571568a84ff7ed919629e13d9d to your computer and use it in GitHub Desktop.
Save akmalhazim/784d55571568a84ff7ed919629e13d9d to your computer and use it in GitHub Desktop.
<?php
namespace App\Modules;
use App\User;
use App\Services\BraintreeService;
class BillingModule {
protected $braintree;
protected $user;
protected $gateway;
/**
* Construct a new instance.
*/
public function __construct( \App\Contracts\PaymentGateway $gateway) {
$this->gateway = $gateway;
}
/**
* Return instance of braintree
*/
public function customer() {
}
/**
* Braintree service.
*/
public function braintree() {
return new BrainTreeService;
}
public function createCustomer ( User $user ) {
dd( \App\Contracts\PaymentGateway::class );
dispatch(new App\Jobs\Settings\Customer\Register( $user ));
return;
}
public function setup ( User $user ) {
$this->createCustomer($user);
return ;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment