Brian,

Here is some old PHP code that interfaces with the XML gateway. Basically generates an XML document and posts it to a URL using Curl. I guess you could do the same with CFHTTP after creating the XML. This code is a few years old so you may have to make some slight changes to the XML.

Hope this helps.
Shane


 $xml_request = "
        <ewaygateway>
            <ewayCustomerID>$my_customerid</ewayCustomerID>
            <ewayTotalAmount>$my_totalamount</ewayTotalAmount>
            <ewayCustomerFirstName>$my_firstname</ewayCustomerFirstName>
            <ewayCustomerLastName>$my_lastname</ewayCustomerLastName>
            <ewayCustomerEmail>$my_email</ewayCustomerEmail>
            <ewayCustomerAddress>$my_address</ewayCustomerAddress>
            <ewayCustomerPostcode>$my_postcode</ewayCustomerPostcode>
            <ewayCustomerInvoiceDescription>$my_invoice_description</ewayCustomerInvoiceDescription>
            <ewayCustomerInvoiceRef>$my_invoice_ref</ewayCustomerInvoiceRef>
            <ewayCardHoldersName>$my_card_name</ewayCardHoldersName>
            <ewayCardNumber>$my_card_number</ewayCardNumber>
            <ewayCardExpiryMonth>$my_card_exp_month</ewayCardExpiryMonth>
            <ewayCardExpiryYear>$my_card_exp_year</ewayCardExpiryYear>
            <ewayTrxnNumber>$my_trxn_number</ewayTrxnNumber>
            <ewayOption1>0</ewayOption1>
            <ewayOption2>0</ewayOption2>
            <ewayOption3>0</ewayOption3>
        </ewaygateway>
  ";

  /* Use CURL to execute XML POST and write output to the temp file */
  $ch = curl_init ($my_url);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_request);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  $response = curl_exec($ch);
  /* Parse result and clean up */
  curl_close($ch);
 
  ...


--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to