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


PHP Invoice::getAmount方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url'));
     $defaults = array('WMI_MERCHANT_ID' => sfConfig::get('app_w1_merchant'), 'WMI_PAYMENT_AMOUNT' => sprintf('%01.2f', $invoice->getAmount()), 'WMI_CURRENCY_ID' => 980, 'WMI_PAYMENT_NO' => $invoice->getId(), 'WMI_DESCRIPTION' => $invoice->geDescription(), 'WMI_SUCCESS_URL' => url_for('payment_w1_success', array(), true), 'WMI_FAIL_URL' => url_for('payment_w1_fail', array(), true), 'WMI_PTENABLED' => 'CashTerminalUAH');
     $defaults['WMI_SIGNATURE'] = $this->createSign($defaults);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:W1RequestForm.class.php

示例2: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'Date'));
     $resultUrl = 'https://' . sfContext::getInstance()->getRequest()->getHost() . url_for('payment_liqpay_result');
     $defaults = array('version' => '1.1', 'merchant_id' => sfConfig::get('app_liqpay_merchant'), 'amount' => $invoice->getAmount(), 'currency' => 'UAH', 'order_id' => $invoice->getId(), 'description' => $invoice->getDescription(), 'result_url' => $resultUrl, 'server_url' => $resultUrl);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:LiqpayRequestForm.class.php

示例3: edit

 /**
  * Update existing payment
  *
  * @param void
  * @return null
  */
 function edit()
 {
     if ($this->active_payment->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     $payment_data = $this->request->post('payment');
     if (!is_array($payment_data)) {
         $payment_data = array('invoice_id' => $this->active_payment->getInvoiceId(), 'amount' => $this->active_payment->getAmount(), 'comment' => $this->active_payment->getComment());
     }
     // if
     $this->smarty->assign('payment_data', $payment_data);
     if ($this->request->isSubmitted()) {
         $this->active_invoice->setAttributes($payment_data);
         $save = $this->active_payment->save();
         if ($save && !is_error($save)) {
             flash_success('Payment has been updated');
             $this->redirectTo('invoices');
         } else {
             $this->smarty->assign('errors', $save);
         }
         // if
     }
     // if
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:PaymentsController.class..php

示例4: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'Date'));
     $resultUrl = 'https://' . sfContext::getInstance()->getRequest()->getHost() . url_for('payment_privat24_result');
     $defaults = array('amt' => $invoice->getAmount(), 'ccy' => 'UAH', 'merchant' => sfConfig::get('app_privat24_merchant'), 'order' => $invoice->getTransactionId(), 'details' => $invoice->getDescription(), 'pay_way' => 'privat24', 'return_url' => $resultUrl, 'server_url' => $resultUrl);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:Privat24RequestForm.class.php

示例5: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'Number'));
     $amount = sprintf('%01.2f', $invoice->getAmount());
     while (strlen($amount) < 13) {
         $amount = '0' . $amount;
     }
     $resultUrl = 'https://' . sfContext::getInstance()->getRequest()->getHost() . url_for('payment_sentry_result');
     $defaults = array('version' => '1.0.0', 'MerID' => sfConfig::get('app_sentry_merchant'), 'MerRespURL' => $resultUrl, 'MerRespURL2' => $resultUrl, 'AcqID' => 414963, 'PurchaseAmt' => str_replace('.', '', $amount), 'PurchaseCurrency' => 980, 'PurchaseCurrencyExponent' => 2, 'SignatureMethod' => 'SHA1', 'OrderID' => $invoice->getTransactionId());
     $defaults['Signature'] = $this->createSign($defaults);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:15,代码来源:SentryRequestForm.class.php

示例6: getWallets

 /**
  * Возвращает доступные для оплаты кошельки
  */
 protected function getWallets(Invoice $invoice)
 {
     $wallets = array();
     foreach (sfConfig::get('app_webmoney_wallet') as $name => $config) {
         $amount = Currency::convertByAbbr($invoice->getAmount(), $config['currency']);
         if (false !== $amount) {
             $wallets[$config['purse']]['amount'] = sprintf('%01.2f', $amount);
             $wallets[$config['purse']]['name'] = $name;
         }
     }
     return $wallets;
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:15,代码来源:actions.class.php


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