Results 1 to 10 of 357

Threaded View

  1. #1
    Join Date
    Aug 2007
    Location
    oregon
    Posts
    12
    Plugin Contributions
    0

    Default Need help with Virtual Merchant module

    apparently Virtual Merchant is the next genesis of the whole viaklix thing.

    I needed to set up a connection to them, so i took the viaklix module available at http://www.modyourzencart.com/free-o...ayment-modules and attempted to modify it to work with Virtual Merchant.

    The results have not been quite satisfactory, as i can't get it to work :)

    Here's what i have so far: http://www.frozenplanet.com/bestnatu...alMerchant.zip

    I've made changes for the new url and name changes of some of the payment fields. However, i don't seem to be able to get it to work. Nothing is showing up in the Virtual Merchant transaction log, but if i build an html file by hand that sends the query, it works.

    wireshark shows that data is being sent to www.myvirtualmerchant.com on port 443, but i'm not clever enough to decipher what is being sent.

    i'm assuming this has something to do with my lack of curl knowlege, as i can see that the variables are all being assigned properly.

    here's part of the html that sends things properly:

    <form action="https://www.myvirtualmerchant.com/VirtualMerchant/process.do" method="POST">
    <input type="hidden" name="ssl_merchant_id" value="xxxxxx">
    <input type="hidden" name="ssl_user_id" value="xxxxxxxx">
    <input type="hidden" name="ssl_pin" value="xxxxxx">
    <input type="hidden" name="ssl_transaction_type" value="ccsale">
    <input type="hidden" name="ssl_card_number" value="5424000000000015">
    <input type="hidden" name="ssl_exp_date" value="1008">
    <input type="hidden" name="ssl_amount" value="1.55">
    <input type="hidden" name="ssl_show_form" value="false">
    <input type="hidden" name="ssl_cvv2" value="present"> <!--CVV2 Indicator -->
    <input type="hidden" name="ssl_cvv2cvc2" value="123"> <!--CVV2 Data -->


    that works fine.

    here's the curl statement to send the data to the server. all i know about curl i learned today, but i'm not sure that it is sending the data in the proper format. here's what i think is the relevant snippet:

    for ($i = 0; $i <= sizeof($post['key'])-1; $i++) {$string .= $post['key'][$i].'='.$post['value'][$i].'&';}//build post vars



    $string = substr($string, 0, -1); // not needed



    $ch = curl_init();//init curl options

    curl_setopt ($ch, CURLOPT_URL, $this->url);

    curl_setopt ($ch, CURLOPT_FRESH_CONNECT, 1); //no cache connection

    curl_setopt ($ch, CURLOPT_POST, 1); //enable the post of vars

    curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);

    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    curl_setopt ($ch, CURLOPT_TIMEOUT, 8 ); // seconds to wait for timeout

    curl_setopt ($ch, CURLOPT_HEADER, 1);

    curl_setopt ($ch, CURLOPT_POSTFIELDS, $string );//posted vars in fromat key1=value1&key2=value2&

    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); //enable return response

    $content = parse_response(curl_exec($ch));




    anyway, sorry for the novel, but if someone can give me a hand here, i'd be happy to package this up for the next sucker who is stuck dealing with Virtual Merchant.

    thanks,

    d.
    Last edited by urbanx; 29 Aug 2007 at 05:01 AM.

 

 

Similar Threads

  1. Need help with New Google Merchant Feeder
    By wonderbread101 in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 28 Dec 2012, 09:15 PM
  2. Replies: 3
    Last Post: 20 Aug 2012, 09:23 PM
  3. Component For Virtual Merchant . Please Help
    By kshap448 in forum Basic Configuration
    Replies: 1
    Last Post: 22 Jul 2009, 04:57 PM
  4. I need help linking my Zen Cart with Intuit merchant
    By MULISH in forum Addon Payment Modules
    Replies: 4
    Last Post: 9 May 2009, 07:26 PM
  5. Can zen cart be used with virtual merchant
    By amonte in forum General Questions
    Replies: 1
    Last Post: 26 Jun 2008, 07:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg