示例#1
0
 /**
  * Constructor with Braintree configuration
  *
  * @param string $container
  * @param PaymentServiceProvider $psp
  */
 public function initialize($container, PaymentServiceProvider $psp)
 {
     parent::initialize($container, $psp);
     if (isset($this->parameters['environment'])) {
         Braintree_Configuration::environment($this->parameters['environment']);
     }
     if (isset($this->parameters['merchant_id'])) {
         Braintree_Configuration::merchantId($this->parameters['merchant_id']);
     }
     if (isset($this->parameters['public_key'])) {
         Braintree_Configuration::publicKey($this->parameters['public_key']);
     }
     if (isset($this->parameters['private_key'])) {
         Braintree_Configuration::privateKey($this->parameters['private_key']);
     }
     return $this;
 }
 /**
  * Constructor with Paypal configuration
  *
  * @param string $container
  * @param PaymentServiceProvider $psp
  */
 public function initialize($container, PaymentServiceProvider $psp)
 {
     parent::initialize($container, $psp);
     if (isset($this->parameters['host'])) {
         $this->setHost($this->parameters['host']);
     }
     if (isset($this->parameters['client_id'])) {
         $this->setClientId($this->parameters['client_id']);
     }
     if (isset($this->parameters['secret'])) {
         $this->setSecret($this->parameters['secret']);
     }
     if (isset($this->parameters['return_url'])) {
         $this->setReturnUrl($this->parameters['return_url']);
     }
     if (isset($this->parameters['cancel_url'])) {
         $this->setCancelUrl($this->parameters['cancel_url']);
     }
     return $this;
 }
示例#3
0
 public function processPayment(Request $request, Transaction $transaction, Delivery $delivery, PaymentProviderFactory $ppf)
 {
     return $ppf->process($request, $transaction, $delivery);
 }
 /**
  * Constructor with Paypal configuration
  *
  * @param string $container
  * @param PaymentServiceProvider $psp
  */
 public function initialize($container, PaymentServiceProvider $psp)
 {
     parent::initialize($container, $psp);
     return $this;
 }