Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Location
    Connecticut
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Configuring HTML code for myvirtualmerchant.com

    I am a volunteer for a veterans organizations www.thenovetleftbehing.org, the have received a credit card machine through myvirtualmerchant.com, and wish to also have it configured to their website. I am also in the process of rebuilding the website to enhance the website. I contacted tech support, they assisted me to access the account, then they advised that I would have to code the information on my own. I have experience with basic HTML coding, and am utilizing MS Expression Web for web design. I followed the example code, and continuously receive the error message below, and have searched the Internet without success.
    Page 43
    Example 3
    The following HTML code is similar to Example 2 shown above, including additional fields required to pass AVS data and CVV2 / CVC2 data:
    <form
    action="https://demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do" method="POST">
    <input type="hidden" name="ssl_merchant_id" value="my_virtualmerchant_id">
    <input type="hidden" name="ssl_user_id" value="my_user_id">
    <input type="hidden" name="ssl_pin" value="my_pin">
    <input type="hidden" name="ssl_transaction_type" value="ccsale">
    <input type="hidden" name="ssl_card_number" value="0000000000000000">
    <input type="hidden" name="ssl_exp_date" value="0000">
    <input type="hidden" name="ssl_amount" value="12.77">
    <input type="hidden" name="ssl_show_form" value="false">
    <input type="hidden" name="ssl_cvv2cvc2_indicator" value="1">
    <input type="hidden" name="ssl_cvv2cvc2" value="1234">
    <input type="hidden" name="ssl_avs_address" value="123 Main St.">
    <input type="hidden" name="ssl_avs_zip" value="01234">
    <input type="submit" value="Donate Now">
    </form>



    An Error Occurred While Processing Your Request
    Error Code : 4012
    Error Name : VID/UID Invalid
    Error Message : The VirtualMerchant ID and/or User ID supplied in the authorization request is invalid.



    I have changed the my_virtualmerchant_id, my_user_id, my_pin according to the account on myvirtualmerchant.com, and still receive the error.
    I was wondering if anyone has knowledge on the configurations for myvirtualmerchant.com to get this configure if you folks would not mind assisting. I only need to set this up for Donations for Military Veterans, no sales or otherwise. I would appreciate any assistance to get this functional.
    Best regards,
    John

  • #2
    New Coder
    Join Date
    Mar 2011
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is an example of a php file I created using my sandbox credentials. Make sure to read the comments in the php script below.

    PHP Code:
    <?php

    // SandBox  Account
        
    $ssl_merchant_id '000666'// replace the 000666 with your MID
        
    $ssl_user_id '000666';  // replace the 000666 with your UID
        
    $ssl_pin '666ABC';  // replace the 666ABC with your PIN

    $ssl_show_form 'true';
    $ssl_result_format 'html';
    $ssl_test_mode 'false';
    $ssl_transaction_type 'ccsale';
    $ssl_amount '18.00';
    $ssl_card_number '4715000000000040';
    $ssl_exp_date '0115';
    $ssl_cvv2cvc2_indicator '1';
    $ssl_cvv2cvc2 '354';
    $ssl_customer_code '1234';
    $ssl_invoice_number 'INV12345';


    //extract data from the post
    extract($_POST);

    //set POST URL
    $url 'https://demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do'// SandBox Post URL
    // $url = 'https://www.myvirtualmerchant.com/VirtualMerchant/process.do'; // Production Post URL

    //Additional fields can be added as necessary to support custom fields or required fields configured in the Virtual Merchant terminal
    $fields = array(
    'ssl_merchant_id'=>urlencode($ssl_merchant_id),
    'ssl_user_id'=>urlencode($ssl_user_id),
    'ssl_pin'=>urlencode($ssl_pin),
    'ssl_show_form'=>urlencode($ssl_show_form),
    'ssl_result_format'=>urlencode($ssl_result_format),
    'ssl_test_mode'=>urlencode($ssl_test_mode),
    'ssl_receipt_apprvl_method'=>urlencode($ssl_receipt_apprvl_method),
    'ssl_error_url'=>'http://www.myaxxus.net/VM_Testing/error.php',
    'ssl_receipt_decl_get_url'=>'http://www.vmtesting.com/testing/declined.php',  // change the URL to point to you declined Receipt
    'ssl_receipt_apprvl_get_url'=>'http://www.vmtesting.com/testing/approval.php'// change the URL to point to you approval Receipt
    'ssl_transaction_type'=>urlencode($ssl_transaction_type),
    'ssl_amount'=>urlencode($ssl_amount),
    'ssl_card_number'=>urlencode($ssl_card_number),
    'ssl_exp_date'=>urlencode($ssl_exp_date),
    'ssl_cvv2cvc2_indicator'=>urlencode($ssl_cvv2cvc2_indicator),
    'ssl_cvv2cvc2'=>urlencode($ssl_cvv2cvc2),
    'ssl_customer_code'=>urlencode($ssl_customer_code),
    'ssl_invoice_number'=>urlencode($ssl_invoice_number),
    );

    //initialize the post string variable
    $fields_string '';
    //build the post string
    foreach($fields as $key=>$value) { $fields_string .=$key.'='.$value.'&'; }
    rtrim($fields_string"&");


    $ssl_vm_session curl_init();
    curl_setopt($ssl_vm_sessionCURLOPT_URL$url);
    curl_setopt($ssl_vm_sessionCURLOPT_POST1);
    curl_setopt($ssl_vm_sessionCURLOPT_POSTFIELDS$fields_string);
    curl_setopt($ssl_vm_sessionCURLOPT_SSL_VERIFYPEERfalse);
    curl_setopt($ssl_vm_sessionCURLOPT_SSL_VERIFYHOSTfalse);


    $result curl_exec($ssl_vm_session);
    curl_close($ssl_vm_session);

    echo 
    "Processing, please wait..."

    ?>
    Last edited by fulltiltphil; 08-12-2013 at 05:59 PM. Reason: fixing the comments in the php code

  • #3
    New Coder
    Join Date
    Mar 2011
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Make sure you are going to the correct POST URL

    The below html is working, make sure you are using the correct POST URL. The example below is using the sandbox post URL, also I commented out the production URL so you can see what you should pass if you are using Production environment.


    Code:
    <form method="POST" action="https://demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do">
    <!--<form method="POST" action="https://www.myvirtualmerchant.com/VirtualMerchant/process.do">-->
    <input type="hidden" name="ssl_merchant_id" value="000666"><!--replace the 000666 with your MID-->
    <input type="hidden" name="ssl_user_id" value="0000666"><!--replace the 000666 with your UID-->
    <input type="hidden" name="ssl_pin" value="666ABC"><!--replace the 666ABC with your PIN-->
    <input type="hidden" name="ssl_transaction_type" value="ccsale">
    <input type="hidden" name="ssl_card_number" value="4715000000000040">
    <input type="hidden" name="ssl_exp_date" value="1221">
    <input type="hidden" name="ssl_amount" value="12.00">
    <input type="hidden" name="ssl_show_form" value="true">
    <input type="hidden" name="ssl_cvv2cvc2_indicator" value="1">
    <input type="hidden" name="ssl_cvv2cvc2" value="354">
    <input type="hidden" name="ssl_avs_address" value="123 Main St.">
    <input type="hidden" name="ssl_avs_zip" value="01234">
    <input type="submit" value="Donate Now">
    </form>


  •  

    Posting Permissions

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