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


PHP Invoice::getCurrency方法代码示例

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


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

示例1: encodeInvoice

 public function encodeInvoice(Invoice $invoice)
 {
     $data = ['id' => $invoice->getId(), 'number' => $invoice->getNumber(), 'name' => $invoice->getName(), 'created' => $invoice->getCreated(), 'delivered' => $invoice->getDelivered(), 'due' => $invoice->getDue(), 'status' => $invoice->getStatus(), 'variable_symbol' => $invoice->getVariableSymbol(), 'constant_symbol' => $invoice->getConstantSymbol(), 'description' => $invoice->getDescription(), 'items' => $this->encodeItems($invoice->getItems()), 'price' => $invoice->getPrice(), 'price_total' => $invoice->getPriceTotal(), 'currency' => $invoice->getCurrency()];
     if ($invoice->getClient()) {
         $data['client'] = $this->encodeClient($invoice->getClient());
     }
     if ($invoice->getShippingAddress()) {
         $data['shipping_address'] = $this->encodeAddress($invoice->getShippingAddress());
     }
     if ($invoice->getDiscount() && $invoice->getDiscount()->getType() != 'none') {
         $data['discount'] = ['type' => $invoice->getDiscount()->getType(), 'value' => $invoice->getDiscount()->getValue()];
     }
     return json_encode(['invoice' => $data]);
 }
开发者ID:tomaj,项目名称:invoice-client,代码行数:14,代码来源:Serializer.php

示例2: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     /*
     Payment Method - Identity
     
      * Credit Payment
     Visa & Mastercard (default) - index.php
     Mobile Money                - mobilemoney.php
     Ezeelink                    - ezeelink.php
     
      * Debit Payment
     Maybank2u Fund Transfer - maybank2u.php
     MEPS FPX                - fpx.php
     CIMB Clicks             - cimb.php
     RHB Online              - rhb.php
     Hong Leong Bank Online  - hlb.php
     Mepscash Online         - mepscash.php
     Webcash                 - webcash.php
     */
     $Payment_Method = '';
     $url = sprintf($this->url, $this->getConfig('merchant_id'), $Payment_Method);
     $a = new Am_Paysystem_Action_Redirect($url);
     $a->amount = $invoice->first_total;
     $a->orderid = $invoice->public_id;
     $a->bill_name = utf8_encode($invoice->getName());
     //UTF-8 encoding is recommended for Chinese contents
     $a->bill_email = $invoice->getEmail();
     $a->bill_mobile = $invoice->getPhone();
     $a->cur = $invoice->getCurrency();
     $a->bill_desc = utf8_encode($invoice->getLineDescription());
     //UTF-8 encoding is recommended for Chinese contents
     $a->returnurl = $this->getPluginUrl('thanks');
     $a->vcode = md5($invoice->first_total . $this->getConfig('merchant_id') . $invoice->public_id . $this->getConfig('verify_key'));
     $a->filterEmpty();
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:36,代码来源:molpay.php

示例3: formatCurrency

 /**
  * @param float|int $value
  * @param Invoice $invoice
  * @return string
  */
 public function formatCurrency($value, Invoice $invoice)
 {
     return is_null($value) ? null : sprintf($this->currencyFormat, $invoice->getCurrency(), $this->formatNumber($value, $invoice->getPrecision()));
 }
开发者ID:imosnet,项目名称:invoice,代码行数:9,代码来源:Formatter.php

示例4: testCurrency

 public function testCurrency()
 {
     $this->assertEquals('Currency', $this->invoice->getCurrency());
     $this->invoice->setCurrency('Currency2');
     $this->assertEquals('Currency2', $this->invoice->getCurrency());
 }
开发者ID:zaporylie,项目名称:php-collector,代码行数:6,代码来源:InvoiceTest.php


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