当前位置: 首页>>代码示例>>PHP>>正文


PHP PayPal::valid方法代码示例

本文整理汇总了PHP中PayPal::valid方法的典型用法代码示例。如果您正苦于以下问题:PHP PayPal::valid方法的具体用法?PHP PayPal::valid怎么用?PHP PayPal::valid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PayPal的用法示例。


在下文中一共展示了PayPal::valid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process

 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 <ph7software@gmail.com> 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();
 }
开发者ID:joswilson,项目名称:NotJustOK,代码行数:47,代码来源:MainController.php


注:本文中的PayPal::valid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。