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


PHP wpshop_tools::getMethode方法代码示例

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


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

示例1: save_payment_return_data

 /**
  * Save the payment data returned by the payment server
  *
  * @param integer $order_id
  */
 function save_payment_return_data($order_id)
 {
     $data = wpshop_tools::getMethode();
     $current_payment_return = get_post_meta($order_id, '_wpshop_payment_return_data', true);
     $current_payment_return[] = $data;
     update_post_meta($order_id, '_wpshop_payment_return_data', $current_payment_return);
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:12,代码来源:payment.class.php

示例2: display_response

 function display_response()
 {
     // Begin Main : Retrieve Variables posted by CMCIC Payment Server
     $CMCIC_bruteVars = wpshop_tools::getMethode();
     // TPE init variables
     $oTpe = new CMCIC_Tpe();
     $oHmac = new CMCIC_Hmac($oTpe);
     // Message Authentication
     $cgi2_fields = sprintf(CMCIC_CGI2_FIELDS, $oTpe->sNumero, $CMCIC_bruteVars["date"], $CMCIC_bruteVars['montant'], $CMCIC_bruteVars['reference'], $CMCIC_bruteVars['texte-libre'], $oTpe->sVersion, $CMCIC_bruteVars['code-retour'], $CMCIC_bruteVars['cvx'], $CMCIC_bruteVars['vld'], $CMCIC_bruteVars['brand'], $CMCIC_bruteVars['status3ds'], $CMCIC_bruteVars['numauto'], $CMCIC_bruteVars['motifrefus'], $CMCIC_bruteVars['originecb'], $CMCIC_bruteVars['bincb'], $CMCIC_bruteVars['hpancb'], $CMCIC_bruteVars['ipclient'], $CMCIC_bruteVars['originetr'], $CMCIC_bruteVars['veres'], $CMCIC_bruteVars['pares']);
     if ($oHmac->computeHmac($cgi2_fields) == strtolower($CMCIC_bruteVars['MAC'])) {
         wpshop_payment::save_payment_return_data($CMCIC_bruteVars['reference']);
         $payment_status = 'denied';
         switch ($CMCIC_bruteVars['code-retour']) {
             case "Annulation":
                 // Attention : an autorization may still be delivered for this payment
                 //wpshop_payment::setOrderPaymentStatus($CMCIC_bruteVars['reference'], 'denied');
                 $payment_status = 'denied';
                 break;
             case "payetest":
                 // test
                 //wpshop_payment::setOrderPaymentStatus($CMCIC_bruteVars['reference'], 'completed');
                 $payment_status = 'completed';
                 break;
             case "paiement":
                 // prod
                 // Save cic txn_id
                 // 					update_post_meta($CMCIC_bruteVars['reference'], '_order_cic_txn_id', $CMCIC_bruteVars['numauto']);
                 //wpshop_payment::set_payment_transaction_number($CMCIC_bruteVars['reference'], $CMCIC_bruteVars['numauto']);
                 //wpshop_payment::setOrderPaymentStatus($CMCIC_bruteVars['reference'], 'completed');
                 $payment_status = 'completed';
                 break;
                 /*** ONLY FOR MULTIPART PAYMENT ***/
             /*** ONLY FOR MULTIPART PAYMENT ***/
             case "paiement_pf2":
             case "paiement_pf3":
             case "paiement_pf4":
                 // Payment has been accepted on the productive server for the part #N
                 // return code is like paiement_pf[#N]
                 // put your code here (email sending / Database update)
                 // You have the amount of the payment part in $CMCIC_bruteVars['montantech']
                 break;
             case "Annulation_pf2":
             case "Annulation_pf3":
             case "Annulation_pf4":
                 // Payment has been refused on the productive server for the part #N
                 // return code is like Annulation_pf[#N]
                 // put your code here (email sending / Database update)
                 // You have the amount of the payment part in $CMCIC_bruteVars['montantech']
                 break;
         }
         $order_meta = get_post_meta($CMCIC_bruteVars['reference'], '_order_postmeta', true);
         $params_array = array('method' => 'cic', 'waited_amount' => number_format((double) $order_meta['order_amount_to_pay_now'], 2, '.', ''), 'status' => $payment_status == 'completed' ? number_format((double) $order_meta['order_amount_to_pay_now'], 2, '.', '') == number_format((double) substr($CMCIC_bruteVars['montant'], 0, -3), 2, '.', '') ? 'payment_received' : 'incorrect_amount' : $payment_status, 'author' => $order_meta['customer_id'], 'payment_reference' => $CMCIC_bruteVars['numauto'], 'date' => current_time('mysql', 0), 'received_amount' => number_format((double) substr($CMCIC_bruteVars['montant'], 0, -3), 2, '.', ''));
         wpshop_payment::check_order_payment_total_amount($CMCIC_bruteVars['reference'], $params_array, $payment_status);
         $receipt = CMCIC_CGI2_MACOK;
     } else {
         // your code if the HMAC doesn't match
         $receipt = CMCIC_CGI2_MACNOTOK . $cgi2_fields;
     }
     // Send receipt to CMCIC server
     printf(CMCIC_CGI2_RECEIPT, $receipt);
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:61,代码来源:cic.class.php


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