當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Invoice::getItem方法代碼示例

本文整理匯總了PHP中Invoice::getItem方法的典型用法代碼示例。如果您正苦於以下問題:PHP Invoice::getItem方法的具體用法?PHP Invoice::getItem怎麽用?PHP Invoice::getItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Invoice的用法示例。


在下文中一共展示了Invoice::getItem方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Form(self::URL);
     $a->co_code = $this->getConfig('co_code');
     $a->pi_code = $invoice->getItem(0)->getBillingPlanData('epoch_product_id');
     if ($site_subcat = $invoice->getItem(0)->getBillingPlanData('epoch_site_subcat')) {
         $a->site_subcat = $site_subcat;
     }
     $a->reseller = 'a';
     $a->zip = $invoice->getZip();
     $a->email = $invoice->getEmail();
     $a->country = $invoice->getCountry();
     $a->no_userpass = self::YES;
     $a->name = $invoice->getName();
     $a->street = $invoice->getStreet();
     $a->phone = $invoice->getPhone();
     $a->city = $invoice->getCity();
     $a->state = $invoice->getState();
     $a->pi_returnurl = $this->getPluginUrl("thanks");
     $a->response_post = self::YES;
     $a->x_payment_id = $invoice->public_id;
     if ($this->getConfig('ach_form') == self::YES) {
         $a->ach_form = self::YES;
     }
     $result->setAction($a);
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:26,代碼來源:epoch.php

示例2: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     if (count($invoice->getItems()) > 1) {
         throw new Am_Exception_InternalError('Only one product at invoice is allowed');
     }
     $bp = $this->getDi()->billingPlanTable->load($invoice->getItem(0)->billing_plan_id);
     if (!($campaignId = $bp->data()->get(self::JP_CAMPAIGN_ID))) {
         throw new Am_Exception_InternalError("Product #{$invoice->getItem(0)->item_id} cannot be paid by junglepay - has no Campaign ID");
     }
     $a = new Am_Paysystem_Action_HtmlTemplate_Junglepay($this->getDir(), 'payment-junglepay-iframe.phtml');
     $a->wkey = $campaignId;
     $a->refererId = $invoice->public_id;
     $result->setAction($a);
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:14,代碼來源:junglepay.php

示例3: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $product = $this->getDi()->productTable->load($invoice->getItem(0)->item_id);
     $billers = json_decode($product->data()->getBlob('sliiing_billers'), true);
     if (!@count($billers['options'])) {
         $this->getDi()->errorLogTable->log("SLIING ERROR : please add billers for product #" . $product->pk());
         throw new Am_Exception_InputError('An error occurred while payment request');
     } elseif (count($billers['options']) == 1) {
         //redirect
         $aff = '0';
         $lin = '0';
         $refe_url = '0';
         $ip = '0';
         $keyword = '0';
         if (isset($_COOKIE['MID'])) {
             $mid = base64_decode($_COOKIE['MID']);
             list($aff, $lin, $refe_url, $ip, $keyword) = explode('|', $mid);
         }
         $datas = base64_encode("{$aff}|{$lin}|{$refe_url}|{$ip}|{$keyword}");
         $url = $billers['options'][0];
         $url = str_replace('$datas', $datas, $url);
         $a = new Am_Paysystem_Action_Redirect($url);
         $a->x_invoice_id = $invoice->public_id;
         $a->username = $invoice->getUser()->login;
         $a->email = urlencode($invoice->getUser()->email);
         $result->setAction($a);
     } else {
         //show form
         $a = new Am_Paysystem_Action_HtmlTemplate_Sliiing($this->getDir(), 'sliiing-confirm.phtml');
         $a->action = $this->getPluginUrl('confirm');
         $a->billers = $billers;
         $a->invoice = $invoice;
         $result->setAction($a);
     }
 }
開發者ID:grlf,項目名稱:eyedock,代碼行數:35,代碼來源:sliiing.php

示例4: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Redirect(self::URL);
     $a->products = current(array_filter(array($invoice->getItem(0)->getBillingPlanData('paypro_product_id'), $this->getConfig('product_id'))));
     $id = $this->invoice->getSecureId("THANKS");
     $desc = array();
     foreach ($invoice->getItems() as $it) {
         if ($it->first_total > 0) {
             $desc[] = $it->item_title;
         }
     }
     $desc = implode(',', $desc);
     $desc .= ". (invoice: {$id})";
     $name = $invoice->getLineDescription();
     $hash = "price={$invoice->first_total}-{$invoice->currency}^^^name={$name}^^^desc={$desc}";
     $a->hash = base64_encode($this->getHash($hash));
     $a->CustomField1 = $invoice->public_id;
     $a->firstname = $invoice->getFirstName();
     $a->Lastname = $invoice->getLastName();
     $a->Email = $invoice->getEmail();
     $a->Address = $invoice->getStreet();
     $a->City = $invoice->getCity();
     $a->Country = $invoice->getCountry() == 'GB' ? 'united kingdom' : $invoice->getCountry();
     $a->State = $invoice->getState();
     $a->Zipcode = $invoice->getZip();
     $a->Phone = $invoice->getPhone();
     //$a->lnk = $this->getCancelUrl();
     $result->setAction($a);
 }
開發者ID:grlf,項目名稱:eyedock,代碼行數:29,代碼來源:paypro.php

示例5: getActionUrl

 function getActionUrl(Invoice $invoice)
 {
     $url = "http://sites.fastspring.com/%s/product/%s";
     if ($this->getConfig('instant') == 1) {
         $url = "https://sites.fastspring.com/%s/instant/%s";
     }
     return sprintf($url, $this->getConfig('company'), $invoice->getItem(0)->getBillingPlanData('fastspring_product_id'));
 }
開發者ID:grlf,項目名稱:eyedock,代碼行數:8,代碼來源:fastspring.php

示例6: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Redirect($this->getConfig('testing') ? self::SANDBOX_URL : self::LIVE_URL);
     $a->merchant_id = $this->getConfig('merchant_id');
     $a->merchant_site_id = $this->getConfig('merchant_site_id');
     $a->currency = $invoice->currency;
     $a->version = '3.0.0';
     $a->merchant_unique_id = $invoice->public_id;
     $a->first_name = $invoice->getFirstName();
     $a->last_name = $invoice->getLastName();
     $a->email = $invoice->getEmail();
     $a->address1 = $invoice->getStreet();
     $a->address2 = $invoice->getStreet1();
     $a->city = $invoice->getCity();
     $a->country = $invoice->getCountry();
     $a->state = $invoice->getState();
     $a->zip = $invoice->getZip();
     $a->phone1 = $invoice->getPhone();
     $a->time_stamp = date("Y-m-d.h:i:s");
     if ($invoice->rebill_times && ($gate2shop_id = $invoice->getItem(0)->getBillingPlanData('gate2shop_id')) && ($gate2shop_template_id = $invoice->getItem(0)->getBillingPlanData('gate2shop_template_id'))) {
         $a->productId = $invoice->getItem(0)->item_id;
         $a->rebillingProductId = $gate2shop_id;
         $a->rebillingTemplateId = $gate2shop_template_id;
         if ($invoice->rebill_times) {
             $a->isRebilling = 'true';
         }
         $a->checksum = md5($this->getConfig('secret_key') . $this->getConfig('merchant_id') . $gate2shop_id . $gate2shop_template_id . $a->time_stamp);
     } else {
         $a->total_amount = $invoice->first_total;
         $a->discount = $invoice->first_discount;
         $a->total_tax = $invoice->first_tax;
         $a->numberofitems = count($invoice->getItems());
         for ($i = 0; $i < $a->numberofitems; $i++) {
             $item = $invoice->getItem($i);
             $a->addParam('item_name_' . ($i + 1), $item->item_title);
             $a->addParam('item_number_' . ($i + 1), $i + 1);
             $a->addParam('item_amount_' . ($i + 1), $item->first_price);
             $a->addParam('item_discount_' . ($i + 1), $item->first_discount);
             $a->addParam('item_quantity_' . ($i + 1), $item->qty);
         }
         $a->checksum = $this->calculateOutgoingHash($a, $invoice);
     }
     $a->filterEmpty();
     $result->setAction($a);
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:45,代碼來源:gate2shop.php

示例7: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $user = $invoice->getUser();
     $subaccount_id = $invoice->getItem(0)->getBillingPlanData("ccbill_subaccount_id") ? $invoice->getItem(0)->getBillingPlanData("ccbill_subaccount_id") : $this->getConfig('subaccount_id');
     $a = new Am_Paysystem_Action_Redirect(self::URL);
     $a->clientAccnum = $this->getConfig('account');
     $a->clientSubacc = $subaccount_id;
     $a->formName = $invoice->getItem(0)->getBillingPlanData("ccbill_form_id");
     $a->username = $user->login;
     $a->email = $invoice->getEmail();
     $a->customer_fname = $invoice->getFirstName();
     $a->customer_lname = $invoice->getLastName();
     $a->address1 = $invoice->getStreet();
     $a->city = $invoice->getCity();
     $a->state = $invoice->getState();
     $a->zipcode = $invoice->getZip();
     $a->country = $invoice->getCountry();
     $a->phone_number = $invoice->getPhone();
     $a->payment_id = $invoice->public_id;
     $a->customVar1 = $invoice->public_id;
     $a->invoice = $invoice->getSecureId("THANKS");
     $a->referer = $invoice->getUser()->aff_id;
     if ($this->getConfig('dynamic_pricing')) {
         $a->formPrice = $invoice->first_total;
         $a->formPeriod = $this->getDays($invoice->first_period);
         $a->currencyCode = $invoice->currency;
         if ($invoice->rebill_times) {
             if ($invoice->rebill_times == IProduct::RECURRING_REBILLS) {
                 $invoice->rebill_times = 99;
             }
             $a->formRecurringPrice = $invoice->second_total;
             $a->formRecurringPeriod = $this->getDays($invoice->second_period);
             $a->formRebills = $invoice->rebill_times;
             $a->formDigest = md5($s = $invoice->first_total . $this->getDays($invoice->first_period) . $invoice->second_total . $this->getDays($invoice->second_period) . $invoice->rebill_times . $invoice->currency . $this->getConfig('salt'));
         } else {
             $a->formDigest = md5($s = $invoice->first_total . $this->getDays($invoice->first_period) . $invoice->currency . $this->getConfig('salt'));
         }
     } else {
         $a->subscriptionTypeId = $invoice->getItem(0)->getBillingPlanData("ccbill_product_id");
         $a->allowedTypes = $invoice->getItem(0)->getBillingPlanData("ccbill_product_id");
         $a->allowedCurrencies = $this->currency_codes[$invoice->currency];
     }
     $result->setAction($a);
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:44,代碼來源:ccbill.php

示例8: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Redirect(self::URL);
     $result->setAction($a);
     $a->MerchantID = $this->config['merchant_id'];
     $a->ProductID = $invoice->getItem(0)->getBillingPlanData('1shoppingcart_id');
     $a->AMemberID = $invoice->invoice_id;
     $a->PostBackURL = $this->getDi()->config->get('root_url') . "/payment/1shoppingcart/ipn";
     $a->filterEmpty();
     $result->setAction($a);
 }
開發者ID:subashemphasize,項目名稱:test_site,代碼行數:11,代碼來源:1shoppingcart.php

示例9: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $user = $invoice->getUser();
     $subaccount_id = $invoice->getItem(0)->getBillingPlanData("ecsuite_subaccount_id") ? $invoice->getItem(0)->getBillingPlanData("ecsuite_subaccount_id") : $this->getConfig('subaccount_id');
     $a = new Am_Paysystem_Action_Redirect(self::URL);
     $a->clientAccnum = $this->getConfig('account');
     $a->clientSubacc = $subaccount_id;
     $a->subscriptionTypeId = $invoice->getItem(0)->getBillingPlanData("ecsuite_product_id");
     $a->allowedTypes = $invoice->getItem(0)->getBillingPlanData("ecsuite_product_id");
     $a->username = $user->login;
     $a->email = $invoice->getEmail();
     $a->customer_fname = $invoice->getFirstName();
     $a->customer_lname = $invoice->getLastName();
     $a->address1 = $invoice->getStreet();
     $a->city = $invoice->getCity();
     $a->state = $invoice->getState();
     $a->zipcode = $invoice->getZip();
     $a->country = $invoice->getCountry();
     $a->phone_number = $invoice->getPhone();
     $a->payment_id = $invoice->public_id;
     $a->formName = $invoice->getItem(0)->getBillingPlanData("ecsuite_form_id");
     $a->customVar1 = $invoice->public_id;
     $result->setAction($a);
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:24,代碼來源:ecsuite.php

示例10:

 function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Redirect('https://clickbetter.com/pay/' . $invoice->getItem(0)->getBillingPlanData('clickbetter_prod_item'));
     $result->setAction($a);
     $a->api = 'yes';
     $a->custom1 = $invoice->public_id;
     $a->first_name = $invoice->getFirstName();
     $a->last_name = $invoice->getLastName();
     $a->email = $invoice->getEmail();
     $a->city = $invoice->getCity();
     $a->address = $invoice->getStreet();
     $a->phone_no = $invoice->getPhone();
     $a->country = $invoice->getCountry();
     $a->zip = $invoice->getZip();
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:15,代碼來源:clickbetter.php

示例11: getURL

 function getURL(Invoice $invoice)
 {
     /* 
      *	Added to fix long username problem.
      *	If username is over 15 characters we truncate it to 15 characters
      *	This helps resolve issue we had with safecart URL versus the IPN validation
      *	return sprintf("https://safecart.com/%s/%s/", $this->getConfig("username"), $invoice->getItem(0)->getBillingPlanData('safecart_product'));
      */
     if (strlen($this->getConfig("username")) > 15) {
         $username = substr($this->getConfig("username"), 0, 15);
     } else {
         $username = $this->getConfig("username");
     }
     return sprintf("https://safecart.com/%s/%s/", $username, $invoice->getItem(0)->getBillingPlanData('safecart_product'));
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:15,代碼來源:safecart.php

示例12: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     if ($this->getConfig('dynamic_pricing')) {
         $a = new Am_Paysystem_Action_Redirect(self::DYNAMIC_URL);
         $a->version = 1;
         $a->shopID = $this->getConfig('site_id');
         $a->priceAmount = $invoice->first_total;
         $a->priceCurrency = $invoice->currency;
         $a->description = $invoice->getLineDescription();
         $a->referenceID = $invoice->public_id;
         $a->signature = sha1($q = $this->getConfig('secret') . ":description=" . $invoice->getLineDescription() . ":priceAmount=" . $invoice->first_total . ":priceCurrency=" . $invoice->currency . ":referenceID=" . $invoice->public_id . ":shopID=" . $this->getConfig('site_id') . ":version=1");
     } else {
         $a = new Am_Paysystem_Action_Redirect(self::URL);
         $a->verotel_id = $this->getConfig('merchant_id');
         $a->verotel_product = $invoice->getItem(0)->getBillingPlanData("verotel_id") ? $invoice->getItem(0)->getBillingPlanData("verotel_id") : $this->getConfig('site_id');
         $a->verotel_website = $invoice->getItem(0)->getBillingPlanData("verotel_id") ? $invoice->getItem(0)->getBillingPlanData("verotel_id") : $this->getConfig('site_id');
         $a->verotel_usercode = $invoice->getLogin();
         $a->verotel_passcode = 'FromSignupForm';
         //$invoice->getUser()->getPlaintextPass();
         $a->verotel_custom1 = $invoice->public_id;
     }
     $a->filterEmpty();
     $result->setAction($a);
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:24,代碼來源:verotel.php

示例13: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Redirect($this->getConfig('testing') == self::MODE_SANDBOX ? self::TESTING_URL : self::URL);
     $a->contract_id = $invoice->getItem(0)->getBillingPlanData("plimus_contract_id");
     $a->custom1 = $invoice->public_id;
     $a->member_id = $invoice->user_id;
     $a->currency = strtoupper($invoice->currency);
     $a->firstName = $invoice->getFirstName();
     $a->lastName = $invoice->getLastName();
     $a->email = $invoice->getEmail();
     if ($this->getConfig('testing') == self::MODE_TEST) {
         $a->testMode = Y;
     }
     $a->filterEmpty();
     $result->setAction($a);
 }
開發者ID:subashemphasize,項目名稱:test_site,代碼行數:16,代碼來源:plimus.php

示例14: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Form($this->getConfig('testing') == self::MODE_SANDBOX ? self::TESTING_URL : self::URL);
     $a->contractId = $invoice->getItem(0)->getBillingPlanData("bluesnap_contract_id");
     $a->custom1 = $invoice->public_id;
     $a->member_id = $invoice->user_id;
     $a->currency = strtoupper($invoice->currency);
     $a->firstName = $invoice->getFirstName();
     $a->lastName = $invoice->getLastName();
     $a->email = $invoice->getEmail();
     $a->overridePrice = sprintf("%.2f", $invoice->first_total);
     $a->overrideRecurringPrice = sprintf("%.2f", $invoice->second_total);
     if ($this->getConfig('testing') == self::MODE_TEST) {
         $a->testMode = Y;
     }
     $a->filterEmpty();
     $result->setAction($a);
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:18,代碼來源:bluesnap.php

示例15: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Redirect(self::URL);
     $a->con = 'my_cart';
     $a->met = 'addToCart';
     $a->pid = $invoice->getItem(0)->getBillingPlanData('premiumwebcart_id');
     $a->pquantity = 1;
     $a->clearcart = 1;
     $a->action = 2;
     $a->fname = $invoice->getFirstName();
     $a->lname = $invoice->getLastName();
     $a->email = $invoice->getEmail();
     $a->baddress1 = $invoice->getStreet();
     $a->bcity = $invoice->getCity();
     $a->bzip = $invoice->getZip();
     $a->bstate = $invoice->getState();
     $a->bcountry = $invoice->getCountry();
     $a->custom1 = $invoice->public_id;
     $result->setAction($a);
 }
開發者ID:grlf,項目名稱:eyedock,代碼行數:20,代碼來源:premiumwebcart.php


注:本文中的Invoice::getItem方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。