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


PHP Merchant::redirect_post方法代码示例

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


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

示例1: _process

 public function _process($params)
 {
     // ask paypal to generate request url
     $data = array('rm' => '2', 'cmd' => '_xclick', 'business' => $this->settings['paypal_email'], 'return' => $params['return_url'], 'cancel_return' => $params['cancel_url'], 'notify_url' => $params['notify_url'], 'item_name' => $params['reference'], 'amount' => sprintf('%01.2f', $params['amount']), 'currency_code' => $params['currency_code'], 'no_shipping' => 1);
     $post_url = $this->settings['test_mode'] ? self::PROCESS_URL_TEST : self::PROCESS_URL;
     Merchant::redirect_post($post_url, $data);
 }
开发者ID:rosellkarlrossj,项目名称:FireSALE,代码行数:7,代码来源:merchant_paypal.php

示例2: _process

 public function _process($params)
 {
     $fp_sequence = $params['reference'];
     $time = time();
     $fingerprint = AuthorizeNetSIM_Form::getFingerprint($this->settings['api_login_id'], $this->settings['transaction_key'], $params['amount'], $fp_sequence, $time);
     $data = array('x_amount' => $params['amount'], 'x_delim_data' => 'FALSE', 'x_fp_sequence' => $fp_sequence, 'x_fp_hash' => $fingerprint, 'x_fp_timestamp' => $time, 'x_relay_response' => 'TRUE', 'x_relay_url' => $params['return_url'], 'x_login' => $this->settings['api_login_id'], 'x_show_form' => 'PAYMENT_FORM');
     $sim = new AuthorizeNetSIM_Form($data);
     $post_url = $this->settings['test_mode'] ? self::PROCESS_URL_TEST : self::PROCESS_URL;
     Merchant::redirect_post($post_url, $sim->getHiddenFieldString());
 }
开发者ID:rat4m3n,项目名称:PyroCart,代码行数:10,代码来源:merchant_authorize_net_sim.php

示例3: _process

 public function _process($params)
 {
     // post data to 2checkout
     $data = array('sid' => $this->settings['account_no'], 'cart_order_id' => $params['reference'], 'total' => $params['amount'], 'tco_currency' => $params['currency_code'], 'skip_landing' => 1, 'x_Receipt_Link_URL' => $params['return_url']);
     foreach (array('card_holder_name' => 'card_name', 'street_address' => 'address', 'street_address2' => 'address2', 'city' => 'city', 'state' => 'region', 'zip' => 'postcode', 'country' => 'country', 'phone' => 'phone', 'email' => 'email') as $key => $field) {
         if (isset($params[$field])) {
             $data[$key] = $params[$field];
         }
     }
     if ($this->settings['test_mode']) {
         $data['demo'] = 'Y';
     }
     Merchant::redirect_post(self::PROCESS_URL, $data);
 }
开发者ID:rosellkarlrossj,项目名称:FireSALE,代码行数:14,代码来源:merchant_2checkout.php

示例4: _process

 public function _process($params)
 {
     $data = array('instId' => $this->settings['installation_id'], 'cartId' => $params['reference'], 'amount' => $params['amount'], 'currency' => $params['currency_code'], 'testMode' => $this->settings['test_mode'] ? 100 : 0, 'MC_callback' => $params['return_url']);
     if (!empty($params['card_name'])) {
         $data['name'] = $params['card_name'];
     }
     if (!empty($params['address'])) {
         $data['address1'] = $params['address'];
     }
     if (!empty($params['address2'])) {
         $data['address2'] = $params['address2'];
     }
     if (!empty($params['city'])) {
         $data['town'] = $params['city'];
     }
     if (!empty($params['region'])) {
         $data['region'] = $params['region'];
     }
     if (!empty($params['postcode'])) {
         $data['postcode'] = $params['postcode'];
     }
     if (!empty($params['country'])) {
         $data['country'] = $params['country'];
     }
     if (!empty($params['phone'])) {
         $data['tel'] = $params['phone'];
     }
     if (!empty($params['email'])) {
         $data['email'] = $params['email'];
     }
     if (!empty($this->settings['secret'])) {
         $data['signatureFields'] = 'instId:amount:currency:cartId';
         $signature_data = array($this->settings['secret'], $data['instId'], $data['amount'], $data['currency'], $data['cartId']);
         $data['signature'] = md5(implode(':', $signature_data));
     }
     $post_url = $this->settings['test_mode'] ? self::PROCESS_URL_TEST : self::PROCESS_URL;
     Merchant::redirect_post($post_url, $data);
 }
开发者ID:rosellkarlrossj,项目名称:FireSALE,代码行数:38,代码来源:merchant_worldpay.php

示例5: _process

 public function _process($params)
 {
     $fp_sequence = $params['reference'];
     $time = time();
     $fingerprint = AuthorizeNetSIM_Form::getFingerprint($this->settings['api_login_id'], $this->settings['transaction_key'], $params['amount'], $fp_sequence, $time);
     $data = array('x_amount' => $params['amount'], 'x_delim_data' => 'FALSE', 'x_fp_sequence' => $fp_sequence, 'x_fp_hash' => $fingerprint, 'x_fp_timestamp' => $time, 'x_invoice_num' => $params['reference'], 'x_relay_response' => 'TRUE', 'x_relay_url' => $params['return_url'], 'x_login' => $this->settings['api_login_id'], 'x_show_form' => 'PAYMENT_FORM', 'x_customer_ip' => $this->CI->input->ip_address());
     // set extra billing details if we have them
     if (isset($params['card_name'])) {
         $names = explode(' ', $params['card_name'], 2);
         $data['x_first_name'] = $names[0];
         $data['x_last_name'] = isset($names[1]) ? $names[1] : '';
     }
     if (isset($params['address']) and isset($params['address2'])) {
         $params['address'] = trim($params['address'] . " \n" . $params['address2']);
     }
     foreach (array('x_company' => 'company', 'x_address' => 'address', 'x_city' => 'city', 'x_state' => 'region', 'x_zip' => 'postcode', 'x_country' => 'country', 'x_phone' => 'phone', 'x_email' => 'email') as $key => $field) {
         if (isset($params[$field])) {
             $data[$key] = $params[$field];
         }
     }
     $sim = new AuthorizeNetSIM_Form($data);
     $post_url = $this->settings['test_mode'] ? self::PROCESS_URL_TEST : self::PROCESS_URL;
     Merchant::redirect_post($post_url, $sim->getHiddenFieldString());
 }
开发者ID:rosellkarlrossj,项目名称:FireSALE,代码行数:24,代码来源:merchant_authorize_net_sim.php


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