����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 18.117.115.50 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/./bofirmacademy.com/vendor/braintree/braintree_php/lib/Braintree/ |
Upload File : |
<?php namespace Braintree; class MerchantGateway { private $_gateway; private $_config; private $_http; public function __construct($gateway) { $this->_gateway = $gateway; $this->_config = $gateway->config; $this->_config->assertHasClientCredentials(); $this->_http = new Http($gateway->config); $this->_http->useClientCredentials(); } public function create($attribs) { $response = $this->_http->post('/merchants/create_via_api', ['merchant' => $attribs]); return $this->_verifyGatewayResponse($response); } private function _verifyGatewayResponse($response) { if (isset($response['response']['merchant'])) { // return a populated instance of merchant return new Result\Successful([ Merchant::factory($response['response']['merchant']), OAuthCredentials::factory($response['response']['credentials']), ]); } else if (isset($response['apiErrorResponse'])) { return new Result\Error($response['apiErrorResponse']); } else { throw new Exception\Unexpected( "Expected merchant or apiErrorResponse" ); } } }