/ Published in: PHP
This sample code shows you how to screen an order by entering all the relevant information into the request parameters.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $apiKey = 'Enter_License_Key'; $params['format'] = 'json'; $params['ip'] = $_SERVER['REMOTE_ADDR']; $params['bill_city'] = 'Cleveland'; $params['bill_state'] = 'OH'; $params['bill_zip_code'] = '44115'; $params['bill_country'] = 'US'; $params['ship_addr'] = '4987 Bingamon Road'; $params['ship_city'] = 'Cleveland'; $params['ship_state'] = 'OH'; $params['ship_zip_code'] = '44115'; $params['ship_country'] = 'US'; $params['email_domain'] = 'gmail.com'; $params['phone'] = '440-5551961'; $params['username_hash'] = fraudlabspro_hash('kevinowen'); $params['password_hash'] = fraudlabspro_hash('3X2hd8cWNw9q'); $params['bin_no'] = '558265'; $params['bank_name'] = 'Bank of Ocean View'; $params['bank_phone'] = '212-500-2489'; $params['card_hash'] = fraudlabspro_hash('5582657189029269'); $params['avs_result'] = 'Y'; $params['cvv_result'] = 'M'; $params['user_order_id'] = '7893'; $params['amount'] = '99.95'; $params['quantity'] = '1'; $params['department'] = 'Online Store'; $params['payment_mode'] = 'creditcard'; $query = ''; foreach($params as $key=>$value){ } $try = 0; do { $result = file_get_contents('https://api.fraudlabspro.com/v1/order/screen?key=' . $apiKey . $query); } while(!$result && $rty++ < 3); echo '<pre>'; echo '</pre>'; function fraudlabspro_hash($s){ $hash = 'fraudlabspro_' . $s; return $hash; } ?>
URL: http://www.fraudlabspro.com