hook_payment_method

函数hook_payment_method()位于uc_payment.module模块中:

<?php
  hook_payment_method()
?>

 

描述:

支付方法收钱的不同方式.默认的, Übercart支持支票、信用卡、和普通付款方式。支付方法显示在结算页面或者订单管理页面,它们从用户那里收集到不同的信息,用来处理和追踪支付。

返回值:

支付方法数组.

 

示例:

<?php
function uc_payment_payment_method() {
  $methods[] = array(
    'id' => 'check',
    'name' => t('Check'),
    'title' => t('Check or Money Order'),
    'desc' => t('Pay by mailing a check or money order.'),
    'callback' => 'uc_payment_method_check',
    'weight' => 1,
    'checkout' => TRUE,
  );
  return $methods;
}
?>

论坛: