/**
  * Register any application services.
  *
  * @return void
  */
 public function register()
 {
     $this->app->singleton(Sales::class, function ($app) {
         Braspag::$apiBase = config('braspag.apiBase');
         Braspag::$apiQueryBase = config('braspag.apiQueryBase');
         return new Sales(config('braspag.merchantId'), config('braspag.merchantKey'));
     });
 }
Exemple #2
0
 public function __construct($merchantId = null, $merchantKey = null)
 {
     $this->headers = ['MerchantId' => is_null($merchantId) ? Braspag::getMerchantId() : $merchantId, 'MerchantKey' => is_null($merchantKey) ? Braspag::getMerchantKey() : $merchantKey];
 }