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


PHP Am_Paysystem_Abstract::getConfig方法代码示例

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


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

示例1: __construct

 public function __construct(Am_Paysystem_Abstract $plugin)
 {
     $this->plugin = $plugin;
     parent::__construct($this->plugin->getConfig('testing') ? self::SANDBOX_URL : self::LIVE_URL, self::METHOD_POST);
     if ($adapter = $this->plugin->createHttpRequest()->getConfig('adapter')) {
         $this->setConfig('adapter', $adapter);
     }
     $this->addPostParameter('VERSION', '63.0')->addPostParameter('SIGNATURE', $this->plugin->getConfig('api_signature'))->addPostParameter('USER', $this->plugin->getConfig('api_username'))->addPostParameter('PWD', $this->plugin->getConfig('api_password'));
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:9,代码来源:PaypalApiRequest.php

示例2: 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

示例3: __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

示例4: __construct

 public function __construct(Am_Paysystem_Abstract $plugin, Invoice $invoice, $transactionId, $amount = null)
 {
     $this->transactionId = $transactionId;
     $this->amount = $amount > 0 ? $amount : null;
     $request = new Am_HttpRequest(Am_Paysystem_Paymill::API_ENDPOINT . 'refunds/' . $transactionId, 'POST');
     $request->setAuth($plugin->getConfig('private_key'), '');
     if ($this->amount > 0) {
         $request->addPostParameter('amount', sprintf('%.02f', $amount) * 100)->addPostParameter('description', 'Refund from aMember script. Username: ' . $invoice->getUser()->login . ', invoice: ' . $invoice->public_id);
     }
     parent::__construct($plugin, $invoice, $request, true);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:11,代码来源:paymill.php

示例5: __construct

 public function __construct(Am_Paysystem_Abstract $plugin, Invoice $invoice, $doFirst)
 {
     $request = new Am_HttpRequest($plugin->getConfig('testing') ? Am_Paysystem_Payflow::TEST_URL : Am_Paysystem_Payflow::LIVE_URL, Am_HttpRequest::METHOD_POST);
     parent::__construct($plugin, $invoice, $request, $doFirst);
     $this->addRequestParams();
 }
开发者ID:grlf,项目名称:eyedock,代码行数:6,代码来源:payflow.php

示例6: __construct

 public function __construct(Am_Paysystem_Abstract $plugin, Invoice $invoice, $charge_id, $amount = null)
 {
     $this->charge_id = $charge_id;
     $this->amount = $amount > 0 ? $amount : null;
     $request = new Am_HttpRequest('https://api.stripe.com/v1/charges/' . $this->charge_id . '/refund', 'POST');
     $request->setAuth($plugin->getConfig('secret_key'), '');
     if ($this->amount > 0) {
         $request->addPostParameter('amount', sprintf('%.2f', $this->amount) * 100);
     }
     parent::__construct($plugin, $invoice, $request, true);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:11,代码来源:stripe.php

示例7: __construct

 public function __construct(Am_Paysystem_Abstract $plugin, Invoice $invoice, $doFirst, $dpsBillingId)
 {
     $xmlOut = '';
     $xmlOut .= '<Txn>';
     $xmlOut .= '<PostUsername>' . $plugin->getConfig('PostUsername') . '</PostUsername>';
     $xmlOut .= '<PostPassword>' . $plugin->getConfig('PostPassword') . '</PostPassword>';
     $xmlOut .= '<Amount>' . $invoice->second_total . '</Amount>';
     $xmlOut .= '<InputCurrency>' . $invoice->currency . '</InputCurrency>';
     $xmlOut .= '<MerchantReference>' . $invoice->getLineDescription() . '</MerchantReference>';
     $xmlOut .= '<TxnType>' . $this->txnType . '</TxnType>';
     $xmlOut .= '<TxnId>' . $invoice->public_id . '</TxnId>';
     $xmlOut .= '<BillingId></BillingId>';
     $xmlOut .= '<DpsBillingId>' . $dpsBillingId . '</DpsBillingId>';
     $xmlOut .= '</Txn>';
     $request = new Am_HttpRequest_PaymentExpress($xmlOut, $this->requestType, (bool) $plugin->getConfig('debugMode'));
     $request->setUrl(Am_Paysystem_PaymentExpress::URL_RECURRING);
     parent::__construct($plugin, $invoice, $request, $doFirst);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:18,代码来源:payment-express.php

示例8: createRecurringPaymentProfile

 function createRecurringPaymentProfile(Invoice $invoice, CcRecord $cc = null, $token = null, $payerId = null)
 {
     if (!$cc && !$token) {
         throw new Am_Exception_Paysystem("Either [token] or [cc] must be specified for " . __METHOD__);
     }
     $periodConvert = array(Am_Period::DAY => 'Day', Am_Period::MONTH => 'Month', Am_Period::YEAR => 'Year');
     $this->addPostParameter('METHOD', 'CreateRecurringPaymentsProfile');
     if ($token) {
         $this->addPostParameter('TOKEN', $token);
         $this->addPostParameter('PAYERID', $payerId);
     }
     $this->addPostParameter('DESC', $invoice->getTerms());
     $this->addPostParameter('PROFILESTARTDATE', gmdate('Y-m-d\\TH:i:s.00\\Z', strtotime($invoice->calculateRebillDate(1) . ' 00:00:01')));
     $this->addPostParameter('PROFILEREFERENCE', $invoice->getRandomizedId('site'));
     //$this->addPostParameter('MAXFAILEDPAYMENTS', '');
     //$this->addPostParameter('AUTOBILLOUTAMT', 'AddToNextBilling');
     $p = new Am_Period($invoice->first_period);
     $pp = $periodConvert[$p->getUnit()];
     if (!$pp) {
         throw new Am_Exception_Configuration("Could not find billing unit for invoice#{$invoice->invoice_id}.first_period: {$invoice->first_period}");
     }
     /// first period - removed as handled with START_DATE
     //$this->addPostParameter('TRIALBILLINGPERIOD', $pp);
     //$this->addPostParameter('TRIALBILLINGFREQUENCY', $p->getCount());
     //$this->addPostParameter('TRIALTOTALBILLINGCYCLES', '1');
     //$this->addPostParameter('TRIALAMT', $invoice->second_total); // bill at the end of trial period
     // it may take up to 24hours to process it! so enabled only for credit card payments
     if ($cc && $invoice->first_total > 0) {
         $this->addPostParameter('INITAMT', $invoice->first_total);
     }
     // bill right now
     /// second period
     $p = new Am_Period($invoice->second_period);
     $pp = $periodConvert[$p->getUnit()];
     if (!$pp) {
         throw new Am_Exception_Configuration("Could not find billing unit for invoice#{$invoice->invoice_id}.second_period: {$invoice->second_period}");
     }
     $this->addPostParameter('BILLINGPERIOD', $pp);
     $this->addPostParameter('BILLINGFREQUENCY', $p->getCount());
     if ($invoice->rebill_times != IProduct::RECURRING_REBILLS) {
         $this->addPostParameter('TOTALBILLINGCYCLES', $invoice->rebill_times);
     }
     $this->addPostParameter('AMT', $invoice->second_total - $invoice->second_tax);
     // bill at end of each payment period
     $this->addPostParameter('TAXAMT', $invoice->second_tax);
     $this->addPostParameter('CURRENCYCODE', $invoice->currency);
     // @todo
     $this->addPostParameter('NOTIFYURL', $this->plugin->getPluginUrl('ipn'));
     $i = 0;
     foreach ($invoice->getItems() as $item) {
         /* @var $item InvoiceItem */
         $this->addPostParameter("L_PAYMENTREQUEST_0_NAME{$i}", $item->item_title);
         $this->addPostParameter("L_PAYMENTREQUEST_0_NUMBER{$i}", $item->item_id);
         $this->addPostParameter("L_PAYMENTREQUEST_0_QTY{$i}", $item->qty);
         $i++;
     }
     $this->addPostParameter('L_BILLINGTYPE0', 'RecurringPayments');
     $this->addPostParameter('L_BILLINGAGREEMENTDESCRIPTION0', $invoice->getTerms());
     if ($cc) {
         $this->setCC($invoice, $cc);
     }
     if ($this->plugin->getConfig('send_shipping')) {
         $this->setShippingAddress($invoice);
     }
     return $this;
 }
开发者ID:grlf,项目名称:eyedock,代码行数:66,代码来源:PaypalApiRequest.php


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