• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Am_Paysystem_Abstract类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: createInvoices

 /**
  *
  * @param User 
  * @param Am_Paysystem_Abstract $payplugin
  * @param array $product_ids array of product_id to use for generation
  * @param int $invCnt count of invoices per user
  * @param int $invVar variation of count of invoices per user
  * @param int $prdCnt count of products per invoice
  * @param int $prdVar variation of products per invoice 
  */
 public function createInvoices($user, $payplugin, $product_ids, $invCnt, $invVar, $prdCnt, $prdVar)
 {
     $invoiceLimit = $this->getLimit($invCnt, $invVar);
     for ($j = 1; $j <= $invoiceLimit; $j++) {
         //subscribe user for some subscriptions
         $invoice = $this->getDi()->invoiceTable->createRecord();
         $productLimit = $this->getLimit($prdCnt, $prdVar);
         for ($k = 1; $k <= $productLimit; $k++) {
             $invoice->add(Am_Di::getInstance()->productTable->load(array_rand($product_ids)), 1);
         }
         $invoice->setUser($user);
         $invoice->setPaysystem($payplugin->getId());
         $invoice->calculate();
         $invoice->save();
         $transaction = new Am_Paysystem_Transaction_Manual($payplugin);
         $transaction->setAmount($invoice->first_total)->setInvoice($invoice)->setTime(new DateTime('-' . rand(0, 200) . ' days'))->setReceiptId('demo-' . uniqid() . microtime(true));
         $invoice->addPayment($transaction);
         //            $cc = $this->createCcRecord($user);
         //
         //            Am_Paysystem_Transaction_CcDemo::_setTime(new DateTime('-'.rand(0,200).' days'));
         //            $payplugin->doBill($invoice, true, $cc);
         $transaction = null;
         unset($transaction);
         $invoice = null;
         unset($invoice);
     }
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:37,代码来源:AdminBuildDemoController.php


示例2: __construct

 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     $DR = preg_replace("/\\s/", "+", $request->get('DR', $_GET['DR']));
     $rc4 = new Crypt_RC4($plugin->getConfig('secret', 'ebskey'));
     $QueryString = base64_decode($DR);
     $rc4->decrypt($QueryString);
     $QueryString = split('&', $QueryString);
     foreach ($QueryString as $param) {
         $param = split('=', $param);
         $request->setParam($param[0], $param[1]);
     }
     parent::__construct($plugin, $request, $request, $invokeArgs);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:13,代码来源:ebs.php


示例3: createInvoices

 /**
  *
  * @param User
  * @param Am_Paysystem_Abstract $payplugin
  * @param array $product_ids array of product_id to use for generation
  * @param int $invCnt count of invoices per user
  * @param int $invVar variation of count of invoices per user
  * @param int $prdCnt count of products per invoice
  * @param int $prdVar variation of products per invoice
  * @param int $start timestamp period begin
  * @param int $end timestamp period end
  */
 public function createInvoices($user, $payplugin, $product_ids, $invCnt, $invVar, $prdCnt, $prdVar, $start, $end, $coupons = array())
 {
     $invoiceLimit = $this->getLimit($invCnt, $invVar);
     for ($j = 1; $j <= $invoiceLimit; $j++) {
         $tm = mt_rand($start, $end);
         /* @var $invoice Invoice */
         $invoice = $this->getDi()->invoiceTable->createRecord();
         $productLimit = max(1, $this->getLimit($prdCnt, $prdVar));
         for ($k = 1; $k <= $productLimit; $k++) {
             try {
                 $product = Am_Di::getInstance()->productTable->load(array_rand($product_ids));
                 if (!($err = $invoice->isProductCompatible($product))) {
                     $invoice->add($product, 1);
                 }
             } catch (Am_Exception_InputError $e) {
             }
         }
         if (!count($invoice->getItems())) {
             continue;
         }
         if (count($coupons) && rand(1, 5) == 5) {
             $invoice->setCouponCode($coupons[array_rand($coupons)]);
             $invoice->validateCoupon();
         }
         $invoice->tm_added = sqlTime($tm);
         $invoice->setUser($user);
         $invoice->calculate();
         $invoice->setPaysystem($payplugin->getId());
         $invoice->save();
         $this->getDi()->setService('dateTime', new DateTime('@' . $tm));
         if ($invoice->isZero()) {
             $tr = new Am_Paysystem_Transaction_Free($this->getDi()->plugins_payment->loadGet('free'));
             $tr->setInvoice($invoice)->setTime(new DateTime('@' . $tm))->process();
         } else {
             $tr = new Am_Paysystem_Transaction_Manual($payplugin);
             $tr->setAmount($invoice->first_total)->setInvoice($invoice)->setTime(new DateTime('@' . $tm))->setReceiptId('demo-' . substr(sprintf('%.4f', microtime(true)), -7))->process();
             //recurring payments
             $i = 1;
             while ((double) $invoice->second_total && $invoice->rebill_date < sqlDate($end) && $invoice->rebill_times >= $i && !$invoice->isCancelled()) {
                 $this->getDi()->setService('dateTime', new DateTime('@' . amstrtotime($invoice->rebill_date)));
                 $tr = new Am_Paysystem_Transaction_Manual($payplugin);
                 $tr->setAmount($invoice->second_total)->setInvoice($invoice)->setTime(new DateTime('@' . amstrtotime($invoice->rebill_date)))->setReceiptId('demo-rebill-' . $i++ . '-' . substr(sprintf('%.4f', microtime(true)), -7))->process();
                 if (rand(1, 5) == 5) {
                     //20% probability
                     $invoice->setCancelled(true);
                 }
             }
             //            $cc = $this->createCcRecord($user);
             //
             //            Am_Paysystem_Transaction_CcDemo::_setTime(new DateTime('-'.rand(0,200).' days'));
             //            $payplugin->doBill($invoice, true, $cc);
         }
         $tr = null;
         unset($tr);
         $invoice = null;
         unset($invoice);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:70,代码来源:DemoBuilder.php


示例4: isNotAcceptableForInvoice

 public function isNotAcceptableForInvoice(Invoice $invoice)
 {
     if ($invoice->rebill_times) {
         return "Interkassa cannot handle products with recurring payment plan";
     }
     return parent::isNotAcceptableForInvoice($invoice);
 }
开发者ID:irovast,项目名称:eyedock,代码行数:7,代码来源:interkassa.php


示例5: isNotAcceptableForInvoice

 public function isNotAcceptableForInvoice(Invoice $invoice)
 {
     if ($invoice->rebill_times && $invoice->first_period != $invoice->second_period) {
         return "WorldPay cannot handle products with different first and second period";
     }
     return parent::isNotAcceptableForInvoice($invoice);
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:7,代码来源:worldpay.php


示例6: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     list($action, $status, $id) = explode("-", $request->getActionName());
     if ($action != 'status') {
         if ($action != 'ipn' && $action != 'thanks' || $request->get('transaction_status') == 'SETTLED') {
             parent::directAction($request, $response, $invokeArgs);
         }
         return;
     }
     if (!in_array($status, array('return', 'ok', 'fail'))) {
         throw new Am_Exception_InternalError("Bad status-request {$status}");
     }
     if (!$id) {
         throw new Am_Exception_InternalError("Invoice ID is absent");
     }
     if (!($this->invoice = $this->getDi()->invoiceTable->findFirstByPublicId($id))) {
         throw new Am_Exception_InternalError("Invoice not found by id [{$id}]");
     }
     switch ($status) {
         case 'return':
             $url = $request->get('transactionStatus') == 'REJECTED' ? $this->getCancelUrl() : $this->getReturnUrl();
             break;
         case 'ok':
             $url = $this->getReturnUrl();
             break;
         case 'fail':
             $url = $this->getCancelUrl();
             break;
     }
     $response->setRedirect($url);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:31,代码来源:paymento.php


示例7: init

 function init()
 {
     parent::init();
     $this->getDi()->productTable->customFields()->add(new Am_CustomFieldText('web_id', '2000Charge.com website ID'));
     $this->getDi()->productTable->customFields()->add(new Am_CustomFieldText(self::PRICEPOINT, 'Mapping code given by 2000Charge'));
     $this->getDi()->productTable->customFields()->add(new Am_CustomFieldSelect('payment_option', 'Payment Option', 'Display Only Specified Payment Options', null, array('options' => $this->payment_options)));
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:7,代码来源:charge2000.php


示例8: directAction

 function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'ipn') {
         echo 'OK';
     }
     return parent::directAction($request, $response, $invokeArgs);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:7,代码来源:paymentwall.php


示例9: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getFiltered('INVNUM', $request->getFiltered('INVOICE')) == '') {
         $response->setRedirect($this->getRootUrl() . '/thanks');
     } else {
         parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:8,代码来源:payflow-link.php


示例10: init

 function init()
 {
     parent::init();
     $opt = array('' => 'Using plugin settings');
     if ($this->isConfigured()) {
         Am_Di::getInstance()->productTable->customFields()->add(new Am_CustomFieldSelect('bitpay_speed_risk', 'Bitpay speed/risk', null, null, array('options' => $opt + $this->transactionSpeedOptions)));
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:8,代码来源:bitpay.php


示例11: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'thanks') {
         return $this->thanksAction($request, $response, $invokeArgs);
     } else {
         return parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:8,代码来源:clickbank.php


示例12: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     try {
         parent::directAction($request, $response, $invokeArgs);
     } catch (Am_Exception_Paysystem_TransactionInvalid $ex) {
         //nothing
     }
     echo 'ok';
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:9,代码来源:ccnow.php


示例13: directAction

 function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     try {
         parent::directAction($request, $response, $invokeArgs);
     } catch (Exception $e) {
         $this->getDi()->errorLogTable->logException($e);
     }
     echo "<!--success-->";
 }
开发者ID:grlf,项目名称:eyedock,代码行数:9,代码来源:multicards.php


示例14: _initSetupForm

 public function _initSetupForm(Am_Form_Setup $form)
 {
     $form->addText('vendor_name')->setLabel(array('Client ID', 'Your Client ID will be supplied when your service is activated. 
                                         It will be in the format “ABC01”, where ABC is your organisation’s
                                         unique three letter code. 
                                         It is used for logging into the NAB Transact administration, reporting and search tool.'));
     $form->addAdvCheckbox('testing')->setLabel('Test Mode');
     parent::_initSetupForm($form);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:9,代码来源:nab.php


示例15: getConfig

 function getConfig($key = null, $default = null)
 {
     switch ($key) {
         case 'auto_create':
             return true;
         default:
             return parent::getConfig($key, $default);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:9,代码来源:justclick.php


示例16: __construct

 public function __construct(Am_Di $di, array $config)
 {
     parent::__construct($di, $config);
     foreach ($di->paysystemList->getList() as $k => $p) {
         if ($p->getId() == $this->getId()) {
             $p->setPublic(false);
         }
     }
     $di->billingPlanTable->customFields()->add(new Am_CustomFieldText('limelight_product_id', "Limelight Product Id", "", array()));
 }
开发者ID:grlf,项目名称:eyedock,代码行数:10,代码来源:limelight.php


示例17: directAction

 function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     try {
         parent::directAction($request, $response, $invokeArgs);
     } catch (Am_Exception $e) {
         $this->getDi()->errorLogTable->logException($e);
         print "OK";
         exit;
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:10,代码来源:paymentwall.php


示例18: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ('reject' == $request->getActionName()) {
         $invoice = $this->getDi()->invoiceTable->findFirstByPublicId($request->get("orderDescription"));
         $url = $this->getRootUrl() . "/cancel?id=" . $invoice->getSecureId('CANCEL');
         return Am_Controller::redirectLocation($url);
     } else {
         return parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:10,代码来源:ipaydna.php


示例19: directAction

 function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     try {
         parent::directAction($request, $response, $invokeArgs);
     } catch (Exception $e) {
         $this->getDi()->errorLogTable->logException($e);
         $response->setRawHeader('HTTP/1.1 600 user-error');
         $response->setBody("Error: " . $e->getMessage());
     }
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:10,代码来源:fortumo.php


示例20: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     try {
         parent::directAction($request, $response, $invokeArgs);
     } catch (Exception $e) {
         $this->getDi()->errorLogTable->logException($e);
     }
     //in other case blockchain will send IPN's once per minute
     echo 'ok';
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:10,代码来源:blockchain.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Am_Paysystem_Result类代码示例发布时间:2022-05-23
下一篇:
PHP Am_HttpRequest类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap