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


PHP PayPal::testIpn方法代码示例

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


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

示例1: getPage

 /**
  * Returns the Shop page for the present parameters
  * @param   string  $template     The page template
  * @return  string                The page content
  */
 static function getPage($template)
 {
     //\DBG::activate(DBG_ERROR_FIREPHP);
     //\DBG::activate(DBG_LOG_FILE);
     self::init();
     self::registerJavascriptCode();
     // PEAR Sigma template
     self::$objTemplate = new \Cx\Core\Html\Sigma('.');
     self::$objTemplate->setErrorHandling(PEAR_ERROR_DIE);
     self::$objTemplate->setTemplate($template);
     // Global module index for clones
     self::$objTemplate->setGlobalVariable('MODULE_INDEX', MODULE_INDEX);
     // Do this *before* calling our friends, especially Customer methods!
     // Pick the default Country for delivery
     if (empty($_SESSION['shop']['countryId2'])) {
         $_SESSION['shop']['countryId2'] = isset($_POST['countryId2']) ? intval($_POST['countryId2']) : \Cx\Core\Setting\Controller\Setting::getValue('country_id', 'Shop');
     }
     // TODO: This should be set up in a more elegant way
     Vat::is_reseller(self::$objCustomer && self::$objCustomer->is_reseller());
     // The coupon code may be set when entering the Shop already
     if (isset($_REQUEST['coupon_code'])) {
         global $sessionObj;
         if (!$sessionObj) {
             $sessionObj = \cmsSession::getInstance();
         }
         $_SESSION['shop']['coupon_code'] = trim(strip_tags(contrexx_input2raw($_REQUEST['coupon_code'])));
         //\DBG::log("Coupon Code: Set to ".$_SESSION['shop']['coupon_code']);
     }
     //\DBG::log("Shop::getPage(): Entered");
     // Global placeholders that are used on (almost) all pages.
     // Add more as desired.
     self::$objTemplate->setGlobalVariable(array('SHOP_CURRENCY_CODE' => Currency::getActiveCurrencyCode(), 'SHOP_CURRENCY_SYMBOL' => Currency::getActiveCurrencySymbol()));
     if (!isset($_GET['cmd'])) {
         $_GET['cmd'] = '';
     }
     if (!isset($_GET['act'])) {
         $_GET['act'] = $_GET['cmd'];
     }
     switch ($_GET['act']) {
         case 'shipment':
             self::showShipmentTerms();
             break;
         case 'success':
             self::success();
             break;
         case 'confirm':
             self::confirm();
             break;
         case 'lsv':
         case 'lsv_form':
             self::view_lsv_form();
             break;
         case 'payment':
             self::payment();
             break;
         case 'account':
             self::view_account();
             break;
         case 'cart':
             self::cart();
             break;
         case 'discounts':
             self::discounts();
             break;
         case 'login':
             self::login();
             break;
         case 'paypalIpnCheck':
             // OBSOLETE -- Handled by PaymentProcessing::checkIn() now
             $objPaypal = new \PayPal();
             $objPaypal->ipnCheck();
             exit;
         case 'sendpass':
             self::view_sendpass();
             break;
         case 'changepass':
             self::_changepass();
             break;
             // Test for PayPal IPN.
             // *DO NOT* remove this!  Needed for site testing.
         // Test for PayPal IPN.
         // *DO NOT* remove this!  Needed for site testing.
         case 'testIpn':
             \PayPal::testIpn();
             // die()s!
             // Test for PayPal IPN validation
             // *DO NOT* remove this!  Needed for site testing.
         // die()s!
         // Test for PayPal IPN validation
         // *DO NOT* remove this!  Needed for site testing.
         case 'testIpnValidate':
             \PayPal::testIpnValidate();
             // die()s!
             // Test mail body generation
             // *DO NOT* remove this!  Needed for site testing.
//.........这里部分代码省略.........
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:101,代码来源:Shop.class.php


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