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


PHP Invoice::getDescription方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice, array $wallets)
 {
     $this->invoice = $invoice;
     $this->wallets = $wallets;
     $defaults = array('LMI_SIM_MODE' => sfConfig::get('app_webmoney_sim_mode'), 'LMI_PAYMENT_NO' => $invoice->getId(), 'LMI_PAYMENT_DESC_BASE64' => base64_encode($invoice->getDescription()));
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:WebmoneyRequestForm.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: __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

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


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