Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
/** * Hook definition for altering payment parameters before talking to a payment processor back end. * * @param string $processor_name * name of the payment processor invoked ('Dummy', 'AuthorizeNet', etc.) * @param string $mode * 'test' or 'live' * @param array $payment_params * array of params as passed to * @param string $op * what operation we are doing on the back end ('direct', 'recurring', etc....) * @return void */function hook_civicrm_payment_params($processor_name, $mode, &$payment_params, $op='direct');
/** * Hook definition for altering payment parameters before talking to a payment processor back end. * * @param string $processor_name * name of the payment processor invoked ('Dummy', 'AuthorizeNet', etc.) * @param string $mode * 'test' or 'live' * @param array &$raw_params * array of params as passed to to the processor * @params array &$cooked_params * params after the processor code has translated them into its own key/value pairs * @param string $op * what operation we are doing on the back end (for now, only 'params' -- parameter translation) * @return void */function hook_civicrm_payment_params($processor_name, $mode, &$raw_params, &$cooked_params, $op='params');
foreach ( $params as $field => $value ) { //parameters are put into the object here $this->_setParam( $field, $value ); } if ( $params['is_recur'] && $params['installments'] > 1 ) { return $this->doRecurPayment( $params ); } $postFields = array( ); $authorizeNetFields = $this->_getAuthorizeNetFields( ); //translation here, returning cooked params foreach ( $authorizeNetFields as $field => $value ) { $postFields[] = $field . '=' . urlencode( $value ); //hook must be called before here }