Ensure you have a valid RIS API Key, URL and data to post.
- Define the settings and validation file Variables.
- Require the sdk/autoload.php.
- Create a Kount_Ris_Request_Inquiry() object.
- Set values of the Inquiry object.
- Add cart info via the Kount_Ris_Data_CartItem Objects
- Request the response via inquiry->getResponse();
- Process the Response object.
<?php define ('KOUNT_SETTINGS_FILE', __DIR__ . '/settings.ini'); define('KOUNT_VALIDATION_FILE', __DIR__ . '/validate.xml'); require __DIR__ . '/sdk/autoload.php'; $q = new Kount_Ris_Request_Inquiry(); $q->setTotal(1500); $q->setCardPayment('6011023856853995'); $q->setIpAddress('198.43.122.98'); $q->setMack('Y'); $q->setWebsite('DEFAULT'); $q->setSessionId('10696db6869912470c2c4b6df51bcaac'); $q->setEmail('joe@example.com'); $cart = array(); $cart[] = new Kount_Ris_Data_CartItem('Electronic', 'TV', 'Big TV', 1, 50000); $q->setCart($cart); $response = $q->getResponse(); print_r($response); ?>