• I have created hook to pass custom fields to card pointe. Further implementation will be needed. It works with no problem for now.

    
    // Add this to your template file or custom code snippet plugin
    
    add_filter('add_custom_field', 'custom_authorize_fields', 10, 6);
    function custom_authorize_fields( $request, $feed, $submission_data, $form, $entry, $max_retries ) {
    	if ($form['id'] == 33){
    	$firstName     = rgpost( 'input_3_3', true );
    	$lastName      = rgpost( 'input_3_6', true );
    	$customerID    = rgpost( 'input_5' );
    	$invoiceNumber = rgpost( 'input_12' );
    	$clinicName    = rgpost( 'input_6' );
    	$cardHolderName = rgpost( 'input_1_5' );
    	$email = rgpost('input_4');
    	$telephone = rgpost('input_16');
    
    	
         $request ['email']   = $email;
    	 $request['phone'] = $telephone;
         $request['userfields'] = array(
    	'firstName'     => $firstName,
    	'lastName'      => $lastName,
    	'customerID'    => $customerID,
    	'invoiceNumber' => $invoiceNumber,
    	'company'    => $clinicName,
    	'cardHolderName' => $cardHolderName,
    );
       
    	 }
    	
    
    	return $request;
    }
    
    // This is inserted in the cardpointe plugin in wp-content/plugins/integration-for-cardconnect-and-gravity-forms/class-gravityforms-cardconnect.php
    // Is on line 720. in function authorize()
    // $request = apply_filters( 'add_custom_field', $request, $feed, $submission_data, $form, $entry, $max_retries);
    
  • The topic ‘Custom Fields Hook’ is closed to new replies.