• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Am_Paysystem_Result类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $m = $this->getConfig('methods');
     if (@count($m) == 1) {
         $a = new Am_Paysystem_Action_Form(self::URL . $m[0] . '/event/');
     } else {
         $a = new Am_Paysystem_Action_HtmlTemplate_Micropayment($this->getDir(), 'micropayment-confirm.phtml');
         $methods = array();
         if (@count($m)) {
             $a->url = self::URL . $m[0] . '/event/';
             foreach ($m as $title) {
                 $methods[self::URL . $title . '/event/'] = $this->getConfig($title . '.title');
             }
         } else {
             foreach ($this->getConfig() as $k => $v) {
                 if (is_array($v) && !empty($v['title'])) {
                     $methods[self::URL . $k . '/event/'] = $v['title'];
                 }
             }
             $a->url = array_shift(array_keys($methods));
         }
         $a->methods = $methods;
     }
     $a->project = $this->getConfig('project');
     $a->amount = $invoice->first_total * 100;
     $a->freepaymentid = $invoice->public_id;
     $a->seal = md5("project={$a->project}&amount={$a->amount}&freepaymentid={$a->freepaymentid}" . $this->getConfig('key'));
     $result->setAction($a);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:29,代码来源:micropayment.php


示例2: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $user = $invoice->getUser();
     $a = new Am_Paysystem_Action_Form(self::LIVE_URL);
     $a->Merchant = $this->getConfig('merchant_id');
     $a->Site = $this->getConfig('site_id');
     $a->DirectTransfer = 'true';
     $a->Amount = $invoice->first_total;
     $a->Currency = $invoice->currency;
     $a->TransRef = $invoice->public_id;
     $a->Product = $invoice->getLineDescription();
     $a->PaymentType = 'cup';
     $a->AttemptMode = '1';
     $a->TestTrans = $this->getConfig('testing') ? '1' : '0';
     $a->__set("customer[email]", $user->email);
     $a->__set("customer[first_name]", $user->name_f);
     $a->__set("customer[last_name]", $user->name_l);
     $a->__set("customer[address1]", $user->street);
     $a->__set("customer[address2]", $user->street2);
     $a->__set("customer[city]", $user->city);
     $a->__set("customer[state]", $user->state);
     $a->__set("customer[postcode]", $user->postcode);
     $a->__set("customer[country]", $user->country);
     $a->__set("customer[phone]", $user->phone);
     $a->ReturnUrlFailure = $this->getCancelUrl();
     $a->ReturnUrlSuccess = $this->getPluginUrl('thanks');
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:28,代码来源:chinapaymentservices.php


示例3: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $req = new Am_HttpRequest(sprintf('https://gateway-japa.americanexpress.com/api/rest/version/23/merchant/%s/session', $this->getConfig('merchant')), Am_HttpRequest::METHOD_POST);
     $req->setAuth('merchant.' . $this->getConfig('merchant'), $this->getConfig('password'));
     $req->setBody(Am_Controller::getJson(array('apiOperation' => 'CREATE_PAYMENT_PAGE_SESSION', 'order' => array('id' => $invoice->public_id, 'amount' => $invoice->first_total, 'currency' => $invoice->currency), 'paymentPage' => array('cancelUrl' => $this->getCancelUrl(), 'returnUrl' => $this->getPluginUrl('thanks')))));
     $this->logRequest($req);
     $res = $req->send();
     $this->logResponse($res);
     if ($res->getStatus() != 201) {
         $result->setFailed(sprintf('Incorrect Responce Status From Paysystem [%s]', $res->getStatus()));
         return;
     }
     $msg = Am_Controller::decodeJson($res->getBody());
     if ($msg['result'] == 'ERROR') {
         $result->setFailed($msg['error']['explanation']);
         return;
     }
     $invoice->data()->set(self::DATA_KEY, $msg['successIndicator'])->update();
     $a = new Am_Paysystem_Action_Redirect(self::URL);
     $a->{'merchant'} = $this->getConfig('merchant');
     $a->{'order.description'} = $invoice->getLineDescription();
     $a->{'paymentPage.merchant.name'} = $this->getDi()->config->get('site_title');
     $a->{'session.id'} = $msg['session']['id'];
     $this->logRequest($a);
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:26,代码来源:amex-hpp.php


示例4: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Form(self::LIVE_URL);
     $u = $invoice->getUser();
     $a->intInstID = $this->config['installation_id'];
     $a->strCartID = $invoice->public_id;
     $a->strCurrency = $invoice->currency;
     $a->strDesc = $invoice->getLineDescription();
     $a->strEmail = $u->email;
     $a->strCardHolder = $u->getName();
     $a->strAddress = $u->street;
     $a->strCity = $u->city;
     $a->strState = $u->state;
     $a->strCountry = $u->country;
     $a->strPostcode = $u->zip;
     $a->intTestMode = $this->getConfig('testing') ? '1' : '';
     $a->fltAmount = sprintf('%.3f', $invoice->first_total);
     //recurring
     if (!is_null($invoice->second_period)) {
         $a->intRecurs = '1';
         $a->intCancelAfter = substr($invoice->rebill_times, 3);
         $a->fltSchAmount1 = sprintf('%.3f', $invoice->second_total);
         $a->strSchPeriod1 = $this->metacharge_get_period($invoice->first_period);
         $a->fltSchAmount = sprintf('%.3f', $invoice->first_total);
         $a->strSchPeriod = $this->metacharge_get_period($invoice->second_period);
     }
     $a->filterEmpty();
     $result->setAction($a);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:29,代码来源:metacharge.php


示例5: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $items = $invoice->getItems();
     if (count($items) > 1) {
         $exc = new Am_Exception_InternalError("It's impossible purchase " . count($items) . " products at one invoice with Selz-plugin");
         $this->getDi()->errorLogTable->logException($exc);
         throw $exc;
     }
     $item = $items[0];
     $bp = $this->getDi()->billingPlanTable->load($item->billing_plan_id);
     $sharedLink = $bp->data()->get(self::SHARED_LINK_FIELD);
     if (!$sharedLink) {
         $exc = new Am_Exception_InternalError("Product #{$item->item_id} has no shared link");
         $this->getDi()->errorLogTable->logException($exc);
         throw $exc;
     }
     if ($this->getConfig('payment_way', 'redirect') == 'redirect') {
         $a = new Am_Paysystem_Action_Redirect($sharedLink);
     } else {
         $a = new Am_Paysystem_Action_HtmlTemplate_Selz($this->getDir(), 'selz.phtml');
         $a->link = $sharedLink;
         $a->inv = $invoice->public_id;
         $a->thanks = $this->getReturnUrl();
         $a->ipn = $this->getPluginUrl('ipn');
         $a->way = $this->getConfig('payment_way');
     }
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:28,代码来源:selz.php


示例6: _doBill

 public function _doBill(Invoice $invoice, $doFirst, CcRecord $cc, Am_Paysystem_Result $result)
 {
     if (!$doFirst) {
         throw new Am_Exception_InternalError('Cannot to run rebill from aMember');
     }
     $post = array('approvedPage' => $this->getReturnUrl(), 'declinedPage' => $this->getCancelUrl(), 'errorPage' => $this->getCancelUrl(), 'merchant_id' => $this->getConfig('merchant_id'), 'trnOrderNumber' => $invoice->public_id, 'trnAmount' => $invoice->first_total, 'ordEmailAddress' => $invoice->getUser()->email, 'ordName' => $invoice->getUser()->getName(), 'trnComments' => $invoice->getLineDescription());
     if ($invoice->second_total > 0) {
         if ($invoice->first_total != $invoice->second_total) {
             throw new Am_Exception_InternalError('First price must be the same second price');
         }
         if ($invoice->first_period != $invoice->second_period) {
             throw new Am_Exception_InternalError('First period must be the same second period');
         }
         list($period, $period_unit) = self::parsePeriod($invoice->first_period);
         $post['trnRecurring'] = 1;
         $post['rbBillingPeriod'] = $period_unit;
         $post['rbBillingIncrement'] = $period;
     }
     $post['trnCardOwner'] = $cc->cc_name_f . " " . $cc->cc_name_l;
     $post['trnCardNumber'] = $cc->cc_number;
     $post['trnExpMonth'] = substr($cc->cc_expire, 0, 2);
     $post['trnExpYear'] = substr($cc->cc_expire, 2);
     $post['ordAddress1'] = $cc->cc_street;
     $post['ordCity'] = $cc->cc_city;
     $post['ordCountry'] = $cc->cc_country;
     $post['ordProvince'] = $cc->cc_state;
     $post['ordPostalCode'] = $cc->cc_zip;
     $post['ordPhoneNumber'] = $cc->cc_phone;
     $action = new Am_Paysystem_Action_Form(self::URL_PT);
     foreach ($post as $k => $v) {
         $action->{$k} = $v;
     }
     $result->setAction($action);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:34,代码来源:beanstream-remote.php


示例7: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Form(self::URL);
     $vars = array('MERCHANT' => $this->getConfig('email'), 'COUNTRY_ID' => $this->getConfig('country'), 'PAYMENT_METHOD_AVAILABLE' => 'all', 'TRANSACTION_ID' => $invoice->public_id);
     $i = '1';
     foreach ($invoice->getItems() as $item) {
         //Creating new format without dot for $item->first_price
         $price = str_replace('.', '', $item->first_total);
         $vars['ITEM_NAME_' . $i] = $item->item_title;
         $vars['ITEM_CODE_' . $i] = $item->item_id;
         $vars['ITEM_AMMOUNT_' . $i] = $price;
         $vars['ITEM_QUANTITY_' . $i] = $item->qty;
         $vars['ITEM_CURRENCY_' . $i] = $item->currency;
         $i++;
     }
     $vars['CURRENCY'] = strtoupper($invoice->currency);
     foreach ($vars as $k => $v) {
         $a->__set($k, $v);
     }
     $a->__set('BUYER_FNAME', $invoice->getFirstName());
     $a->__set('BUYER_LNAME', $invoice->getLastName());
     $a->__set('BUYER_EMAIL', $invoice->getEmail());
     $a->__set('BUYER_PHONE', $invoice->getPhone());
     $a->__set('BUYER_STREET', $invoice->getStreet());
     $a->__set('BUYER_STATE', $invoice->getState());
     $a->__set('BUYER_CITY', $invoice->getCity());
     $a->__set('BUYER_COUNTRY', $invoice->getCountry());
     $a->__set('BUYER_ZIP_CODE', $invoice->getZip());
     $a->__set('BUYER_CITY', $invoice->getCity());
     $a->__set('BUYER_STATE', $invoice->getState());
     $a->__set('LANGUAGE', $this->getConfig('language', 'es'));
     $result->setAction($a);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:33,代码来源:dineromail.php


示例8: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     if ($this->getConfig('instant') == 1) {
         $a = new Am_Paysystem_Action_Redirect($this->getActionUrl($invoice));
     } else {
         $a = new Am_Paysystem_Action_Form("http://sites.fastspring.com/" . $this->getConfig('company') . "/api/order");
         $a->operation = 'create';
         $a->destination = 'checkout';
         $i = 1;
         foreach ($invoice->getItems() as $item) {
             $path = "product_{$i}_path";
             $quantity = "product_{$i}_quantity";
             $a->{$path} = '/' . $item->getBillingPlanData('fastspring_product_id');
             $a->{$quantity} = $item->qty;
             $i++;
         }
     }
     $a->contact_fname = $invoice->getFirstName();
     $a->contact_lname = $invoice->getLastName();
     //$a->contact_company = '';
     $a->contact_email = $invoice->getEmail();
     $a->contact_phone = $invoice->getPhone();
     $a->referrer = $invoice->public_id;
     if ($this->getConfig('testing')) {
         $a->mode = 'test';
         $a->member = 'new';
         $a->sessionOption = 'new';
     }
     $coupon = $invoice->getCoupon()->code;
     if ($coupon) {
         $a->coupon = $coupon;
     }
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:34,代码来源:fastspring.php


示例9: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Form($this->getConfig('testing') ? self::TEST_URL : self::LIVE_URL);
     $a->vendor_name = $this->getConfig('vendor_name');
     $a->payment_alert = $this->getDi()->config->get('admin_email');
     $a->__set($invoice->getLineDescription(), $invoice->first_total);
     $a->payment_reference = $invoice->public_id;
     $a->receipt_address = $invoice->getEmail();
     if (floatval($invoice->first_tax) > 0) {
         $a->gst_rate = $invoice->tax_rate;
         $a->gst_added = 'true';
     }
     $if = array();
     $a->__set($if[] = 'E-Mail', $invoice->getEmail());
     $a->__set($if[] = 'Country', $this->getCountry($invoice));
     $a->__set($if[] = 'Name', $invoice->getName());
     $a->__set($if[] = 'Street/PO Box', $invoice->getStreet());
     $a->__set($if[] = 'City', $invoice->getCity());
     $a->__set($if[] = 'State', $this->getState($invoice));
     $a->__set($if[] = 'Post Code', $invoice->getZip());
     $a->__set($if[] = 'Telephone Number', $invoice->getPhone());
     $a->information_fields = implode(',', $if);
     $a->return_link_url = $this->getReturnUrl();
     $a->reply_url = $this->getPluginUrl('ipn') . '?invoice=' . $invoice->public_id;
     $a->reply_link_url = $this->getPluginUrl('ipn') . '?invoice=' . $invoice->public_id;
     $result->setAction($a);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:27,代码来源:nab.php


示例10: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $user = $invoice->getUser();
     $a = new Am_Paysystem_Action_Redirect($this->getConfig('testing') ? self::SANDBOX_URL : self::LIVE_URL);
     $result->setAction($a);
     $a->StoreKey = $this->getConfig('storekey');
     $a->CustomerRefNo = $invoice->public_id;
     $a->PaymentType = '';
     $a->CardAction = '0';
     $a->OrderID = $invoice->invoice_id;
     $a->UserID = $invoice->getLogin();
     $a->Email = $invoice->getEmail();
     $a->CustomerIP = $user->remote_addr ? $user->remote_addr : $_SERVER['REMOTE_ADDR'];
     $a->Bname = $invoice->getFirstName() . ' ' . $invoice->getLastName();
     $a->Baddress1 = $user->street;
     $a->Bcity = $user->city;
     $a->Bpostalcode = $user->zip;
     $a->Bcountry = $user->country;
     $a->Sname = $invoice->getFirstName() . ' ' . $invoice->getLastName();
     $a->Saddress1 = $user->street;
     $a->Scity = $user->city;
     $a->Spostalcode = $user->zip;
     $a->Scountry = $user->country;
     $a->SubTotal = $invoice->first_total - $invoice->first_tax;
     $a->Tax1 = $invoice->first_tax;
     $a->ThanksURL = $this->getPluginUrl("thanks");
     $result->setAction($a);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:28,代码来源:psigate.php


示例11: _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


示例12: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     if (!$this->getConfig('wallet_id')) {
         throw new Am_Exception_Configuration("There is a configuration error in [okpay] plugin - no [wallet_id] Wallet ID or e-mail");
     }
     $a = new Am_Paysystem_Action_Redirect(self::URL);
     $result->setAction($a);
     # Payment config
     $a->ok_receiver = $this->getConfig('wallet_id');
     $a->ok_invoice = $invoice->getRandomizedId();
     $a->ok_currency = strtoupper($invoice->currency);
     $a->ok_item_1_name = $invoice->getLineDescription();
     $a->ok_item_1_price = $invoice->first_total;
     # Payer data
     $a->ok_payer_first_name = $invoice->getFirstName();
     $a->ok_payer_last_name = $invoice->getLastName();
     $a->ok_payer_street = $invoice->getStreet();
     $a->ok_payer_city = $invoice->getCity();
     $a->ok_payer_state = $invoice->getState();
     $a->ok_payer_zip = $invoice->getZip();
     $a->ok_payer_country = $invoice->getCountry();
     # IPN and Return URLs
     $a->ok_ipn = $this->getPluginUrl('ipn');
     $a->ok_return_success = $this->getReturnUrl();
     $a->ok_return_fail = $this->getCancelUrl();
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:26,代码来源:okpay.php


示例13: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $req = $this->createHttpRequest();
     $req->setUrl(self::POST_URL);
     $req->addPostParameter('Key', $this->getConfig('app_key'));
     $req->addPostParameter('Secret', $this->getConfig('app_secret'));
     $req->addPostParameter('DestinationId', $this->getConfig('destination_id'));
     $req->addPostParameter('OrderId', $invoice->public_id);
     $req->addPostParameter('Amount', $invoice->first_total);
     $req->addPostParameter('Test', $this->getConfig('testing') ? 'true' : 'false');
     $req->addPostParameter('Redirect', $this->getPluginUrl('thanks') . '?id=' . $invoice->getSecureId('THANKS'));
     $req->addPostParameter('Name', $this->getDi()->config->get('site_title'));
     $req->addPostParameter('Description', $invoice->getLineDescription());
     $req->addPostParameter('Callback', $this->getPluginUrl('ipn'));
     $this->logRequest($req);
     $req->setMethod(Am_HttpRequest::METHOD_POST);
     $response = $req->send();
     $this->logResponse($response);
     $resp = $response->getBody();
     if (strstr($resp, "Invalid+application+credentials")) {
         $result->setFailed("Invalid Application Credentials.");
         return;
     } elseif (strstr($resp, "error")) {
         $result->setFailed("Invalid Response From Dwolla's server.");
         return;
     }
     $i = strpos($resp, "checkout/");
     $checkout_id = substr($resp, $i + 9, 36);
     $a = new Am_Paysystem_Action_Redirect(self::REDIRECT_URL . $checkout_id);
     $result->setAction($a);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:31,代码来源:dwolla.php


示例14: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     //recurring
     if (!is_null($invoice->second_period)) {
         if ($invoice->first_total != $invoice->second_total) {
             throw new Am_Exception_InputError(___('Wepay does not support trial periods!'));
         }
         list($period, $end_time) = $this->getPeriod($invoice);
         $mode = 'preapproval';
         $params = array('account_id' => $this->getConfig('account_id'), 'amount' => $invoice->second_total, 'short_description' => $invoice->getLineDescription(), 'redirect_uri' => $this->getReturnUrl(), 'callback_uri' => $this->getPluginUrl('ipn'), 'reference_id' => $invoice->public_id, 'frequency' => 1, 'end_time' => $end_time, 'auto_recur' => 'true', 'period' => $period, 'fee_payer' => $this->getConfig('fee_payer'));
     } else {
         $mode = 'checkout';
         $params = array('account_id' => $this->getConfig('account_id'), 'amount' => $invoice->first_total, 'short_description' => $invoice->getLineDescription(), 'type' => 'GOODS', 'redirect_uri' => $this->getPluginUrl('thanks'), 'reference_id' => $invoice->public_id, 'fee_payer' => $this->getConfig('fee_payer'));
     }
     $params = array_filter($params);
     $req = new Am_HttpRequest($this->getUrl() . "/{$mode}/create", Am_HttpRequest::METHOD_POST);
     $req->setBody(json_encode($params));
     $req->setHeader("Content-Type", "application/json");
     $req->setHeader("Authorization", "Bearer " . $this->getConfig('token'));
     $res = $req->send();
     $arr = json_decode($res->getBody(), true);
     if ($res->getStatus() != 200) {
         $this->getDi()->errorLogTable->log("WEPAY API ERROR : {$arr['error_code']} - {$arr['error_description']}");
         throw new Am_Exception_InputError(___('Error happened during payment process. '));
     }
     if (!empty($arr['error_description'])) {
         throw new Am_Exception_InputError($arr['error_description']);
     }
     $a = new Am_Paysystem_Action_Redirect(!empty($arr['checkout_uri']) ? $arr['checkout_uri'] : $arr['preapproval_uri']);
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:31,代码来源:wepay.php


示例15: _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


示例16: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Form(self::URL);
     $vars = array('MERCHANT' => $this->getConfig('merchant'), 'ORDER_REF' => $invoice->public_id, 'ORDER_DATE' => $invoice->tm_added);
     foreach ($invoice->getItems() as $item) {
         $vars['ORDER_PNAME[]'] = $item->item_title;
         $vars['ORDER_PCODE[]'] = $item->item_id;
         $vars['ORDER_PRICE[]'] = $item->first_price;
         $vars['ORDER_QTY[]'] = $item->qty;
         $vars['ORDER_VAT[]'] = $item->first_tax;
     }
     $vars['ORDER_SHIPPING'] = 0;
     $vars['PRICES_CURRENCY'] = strtoupper($invoice->currency);
     $vars['DISCOUNT'] = $invoice->first_discount;
     foreach ($vars as $k => $v) {
         $a->__set($k, $v);
     }
     $a->__set('ORDER_HASH', $this->calculateHash($vars));
     $a->__set('BILL_FNAME', $invoice->getFirstName());
     $a->__set('BILL_LNAME', $invoice->getLastName());
     $a->__set('BILL_EMAIL', $invoice->getEmail());
     $a->__set('BILL_PHONE', $invoice->getPhone());
     $a->__set('BILL_ADDRESS', $invoice->getStreet());
     $a->__set('BILL_ZIPCODE', $invoice->getZip());
     $a->__set('BILL_CITY', $invoice->getCity());
     $a->__set('BILL_STATE', $invoice->getState());
     $a->__set('BILL_COUNTRYCODE', $invoice->getCountry());
     $a->__set('LANGUAGE', $this->getConfig('language', 'ro'));
     if ($this->getConfig('testing')) {
         $a->__set('TESTORDER', 'TRUE');
     }
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:33,代码来源:epayment.php


示例17: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $user = $invoice->getUser();
     $a = new Am_Paysystem_Action_Redirect(self::LIVE_URL);
     $a->sitereference = $this->getConfig('sitereference');
     $a->currencyiso3a = $invoice->currency;
     $a->mainamount = $invoice->first_total;
     $a->version = 1;
     $a->billingstreet = $user->street;
     $a->billingtown = $user->city;
     $a->billingcounty = $user->country;
     $a->billingpostcode = $user->zip;
     $a->billingfirstname = $user->name_f;
     $a->billinglastname = $user->name_l;
     $a->billingemail = $user->email;
     $a->billingtelephone = $user->phone;
     $a->customerstreet = $user->street;
     $a->customertown = $user->city;
     $a->customercounty = $user->country;
     $a->customerpostcode = $user->zip;
     $a->customerfirstname = $user->name_f;
     $a->customerlastname = $user->name_l;
     $a->customeremail = $user->email;
     $a->customertelephone = $user->phone;
     $a->orderreference = $invoice->public_id;
     $a->filterEmpty();
     $result->setAction($a);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:28,代码来源:securetrading.php


示例18: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Form(self::WINDOW_URL);
     $currency = $this->getCurrencyCode($invoice);
     /* Mandatory input parameters: */
     $formKeyValues = array();
     $formKeyValues['merchant'] = $this->getConfig('merchant');
     $formKeyValues['amount'] = intval($invoice->first_total * 100);
     $formKeyValues['currency'] = $currency;
     $formKeyValues['orderid'] = $invoice->public_id;
     $formKeyValues['acceptReturnUrl'] = $this->getReturnUrl($request);
     /* Optional input parameters: */
     $formKeyValues['cancelreturnurl'] = $this->getCancelUrl($request);
     $formKeyValues['callbackurl'] = $this->getPluginUrl('ipn');
     $formKeyValues['language'] = $this->getConfig('lang');
     $formKeyValues['addFee'] = 1;
     $formKeyValues['capturenow'] = 1;
     /* Invoice's parameters: */
     $formKeyValues['oiTypes'] = 'QUANTITY;DESCRIPTION;AMOUNT;ITEMID';
     $formKeyValues['oiNames'] = 'Items;Description;Amount;ItemId';
     $i = 0;
     foreach ($invoice->getItems() as $item) {
         $row_name = "oiRow" . ++$i;
         $formKeyValues[$row_name] = $item->qty . ";" . $item->item_title . ";" . intval($item->first_total * 100) . ";" . $item->item_id;
     }
     if ($this->getConfig('test')) {
         $formKeyValues['test'] = 1;
     }
     foreach ($formKeyValues as $k => $v) {
         $a->addParam($k, $v);
     }
     $a->addParam('MAC', $this->calculateMac($formKeyValues, $this->getConfig('hmackey')));
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:34,代码来源:dibs-payment-window.php


示例19: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Redirect($this->getConfig('testing') ? self::TEST_URL : self::URL);
     $a->instId = $this->getConfig('installation_id');
     $a->cartId = $invoice->public_id;
     $a->currency = $invoice->currency;
     $a->desc = $invoice->getLineDescription();
     $a->email = $invoice->getEmail();
     $a->name = $invoice->getName();
     $a->address = $invoice->getStreet();
     $a->city = $invoice->getCity();
     $a->state = $invoice->getState();
     $a->postcode = $invoice->getZip();
     //$a->MC_callback = preg_replace('|^https?://|', '', $this->getPluginUrl('ipn'));
     $a->amount = $invoice->first_total;
     if ($this->getConfig('testing')) {
         $a->testMode = 100;
         $a->name = 'CAPTURE';
     }
     if ($invoice->rebill_times) {
         if ($invoice->rebill_times != IProduct::RECURRING_REBILLS) {
             $a->noOfPayments = $invoice->rebill_times;
         }
         $a->futurePayType = 'regular';
         list($c, $u) = $this->period2Wp($invoice->second_period);
         $a->intervalUnit = $u;
         $a->intervalMult = $c;
         $a->normalAmount = $invoice->second_total;
         $a->option = 0;
         list($c, $u) = $this->period2Wp($invoice->first_period);
         $a->startDelayMult = $c;
         $a->startDelayUnit = $u;
     }
     $result->setAction($a);
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:35,代码来源:worldpay.php


示例20: _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);
     $result->setAction($a);
     $u = $invoice->getUser();
     $vars = array();
     $vars['PSPID'] = $this->config['pspid'];
     $vars['ORDERID'] = $invoice->public_id;
     $vars['AMOUNT'] = $invoice->first_total * 100;
     $vars['CURRENCY'] = $invoice->currency;
     $vars['LANGUAGE'] = 'en_US';
     $vars['CN'] = $u->getName();
     $vars['EMAIL'] = $u->email;
     $vars['OWNERZIP'] = $u->zip;
     $vars['OWNERADDRESS'] = $u->street;
     $vars['OWNERCTY'] = $u->city;
     $vars['COM'] = $invoice->getLineDescription();
     $vars['HOMEURL'] = $this->getReturnUrl();
     $vars['ACCEPTURL'] = $this->getPluginUrl('thanks');
     $vars['DECLINEURL'] = $this->getCancelUrl();
     $vars['CANCELURL'] = $this->getCancelUrl();
     $vars = array_filter($vars);
     ksort($vars);
     foreach ($vars as $k => $v) {
         $sha .= "{$k}={$v}" . $this->config['sha_in'];
         $a->addParam($k, $v);
     }
     $a->SHASIGN = sha1($sha);
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:30,代码来源:postfinance.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Am_Query类代码示例发布时间:2022-05-23
下一篇:
PHP Am_Paysystem_Abstract类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap