PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

post_to_third_party Authentication with Pyrix

  1. I am integrating pyrix API with a form and had a question for my coding. Pyrix api requires authentication (http://code.google.com/p/piryx-api/wiki/Authentication). I am not a strong php coder. Where and what would I add to my code below to make it work?

    <?php
    add_action('gform_after_submission_2', 'post_to_third_party', 10, 2);
    function post_to_third_party($entry, $form) {
    
        $post_url = 'https://secure.piryx.com/api/accounts/iLE6xTsx/payments';
        $body = array(
            'CampaignCode' => $entry[''],
            'Amount' => $entry['15'],
    	'Payment' => $entry['24'],
            'Description' => $entry['21'],
            'CardNumber' => $entry['38'],
            'CardSecurityCode' => $entry['41'],
    	'CardExpirationMonth' => $entry['39'],
            'CardExpirationYear' => $entry['40'],
            'RoutingNumber' => $entry['25'],
            'AccountNumber' => $entry['26'],
    	'BillingAddress1' => $entry['31'],
            'BillingAddress2' => $entry['42'],
            'BillingCity' => $entry['32'],
            'BillingState' => $entry['33'],
    	'BillingZip' => $entry['34'],
            'BillingPeriod' => $entry['28'],
            'TotalPayments' => $entry['29'],
            'Email' => $entry['36'],
    	'FirstName' => $entry['2'],
            'MiddleName' => $entry['3'],
            'LastName' => $entry['4'],
            'Phone' => $entry['10'],
    	'WorkPhone' => $entry['11'],
            'MobilePhone' => $entry['13'],
            'FaxPhone' => $entry['12']
            );
    
        $request = new WP_Http();
        $response = $request->post($post_url, array('body' => $body));
    
    }
    ?>
    Posted 11 years ago on Thursday January 17, 2013 | Permalink
  2. That question should be directed to Pyrix as it is unrelated to Gravity Forms. Thank you.

    Posted 11 years ago on Thursday January 17, 2013 | Permalink

This topic has been resolved and has been closed to new replies.