Exemple #1
0
 public function pay()
 {
     $requestor = new Conekta_ApiRequestor($this->_apiKey);
     $url = $this->instanceUrl() . '/pay';
     list($response, $apiKey) = $requestor->request('post', $url);
     $this->refreshFrom($response, $apiKey);
     return $this;
 }
Exemple #2
0
 public function retrieve($id, $params = null)
 {
     $requestor = new Conekta_ApiRequestor($this->_apiKey);
     $base = $this['url'];
     $id = Conekta_ApiRequestor::utf8($id);
     $extn = urlencode($id);
     list($response, $apiKey) = $requestor->request('get', "{$base}/{$extn}", $params);
     return Conekta_Util::convertToConektaObject($response, $apiKey);
 }
 protected function _scopedDelete($class, $params = null)
 {
     self::_validateCall('delete');
     $requestor = new Conekta_ApiRequestor($this->_apiKey);
     $url = $this->instanceUrl();
     list($response, $apiKey) = $requestor->request('delete', $url, $params);
     $this->refreshFrom($response, $apiKey);
     return $this;
 }
Exemple #4
0
 public function deleteDiscount()
 {
     $requestor = new Conekta_ApiRequestor($this->_apiKey);
     $url = $this->instanceUrl() . '/discount';
     list($response, $apiKey) = $requestor->request('delete', $url);
     $this->refreshFrom(array('discount' => null), $apiKey, true);
 }