public function process($sProvider = '') { switch ($sProvider) { case 'paypal': $oPayPal = new PayPal($this->config->values['module.setting']['sandbox.enable']); if ($oPayPal->valid() && $this->httpRequest->postExists('item_number')) { if ($this->oUserModel->updateMembership($this->httpRequest->post('item_number'), $this->iProfileId, $this->httpRequest->post('amount'), $this->dateTime->dateTime('Y-m-d H:i:s'))) { $this->log($oPayPal, t('PayPal payment was made, the following information:')); $this->_bStatus = true; // Status is OK } } unset($oPayPal); break; case '2co': $o2CO = new TwoCO($this->config->values['module.setting']['sandbox.enable']); $sVendorId = $this->config->values['module.setting']['2co.vendor_id']; $sSecretWord = $this->config->values['module.setting']['2co.secret_word']; if ($o2CO->valid($sVendorId, $sSecretWord) && $this->httpRequest->postExists('sale_id')) { if ($this->oUserModel->updateMembership($this->httpRequest->post('sale_id'), $this->iProfileId, $this->httpRequest->post('price'), $this->dateTime->dateTime('Y-m-d H:i:s'))) { $this->log($o2CO, t('2CheckOut payment was made, the following information:')); $this->_bStatus = true; // Status is OK } } unset($o2CO); break; case 'ccbill': // In developing... // Contact us at <*****@*****.**> if you want to help us develop the payment system CCBill break; default: $this->displayPageNotFound(t('Provinder Not Found!')); } // Set the page titles $this->sTitle = $this->_bStatus ? t('Thank you!') : t('Error occurred!'); $this->view->page_title = $this->sTitle; $this->view->h2_title = $this->sTitle; if ($this->_bStatus) { $this->updateAffCom(); } // Set the valid page $sPage = $this->_bStatus ? 'success' : 'error'; $this->manualTplInclude($sPage . $this->view->getTplExt()); // Output $this->output(); }