Qwintry.com integration

For our own website, we decided to go with pretty simple integration for now. This integration consists of two parts:

  1. Anticarder indicator on each registered user (carder / not carder)
  2. The shortcut to add user as carder (just an A HREF tag)
And here is how it looks like:

Registered customers list

Customer profile

How It Works?

For image indicator, we use /api/v1/carders API call with format=img. This approach is super-simple in terms of integration, but for each indicator your server generates request to Anticarder server. To see how it looks like in real PHP code, go to our docs page and click on /api/v1/carders section, and then click on the PHP example:



For "Add to Anticarder.com" quick link (which leads to Anticarder.com carder creation form, with all the fields pre-populated), we've used an /api/v1/carders/new API call, so the code on Qwintry side looks like this ($acc is current viewed profile object):

        function qwintry_anticarder_create($acc) {
          $api_host = "http://anticarder.com";
          $username = "[email protected]";
          $apikey   = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx";

          $nonce = md5(rand(), true);
          $created = REQUEST_TIME;

          $digest = base64_encode(sha1($nonce.$created.$apikey,true));
          $b64nonce = base64_encode($nonce);

          $query1 = http_build_query(array('carder' => array(     
                'firstname' => $acc->field_first_name[LANGUAGE_NONE][0]['value'],
                'lastname'  => $acc->field_last_name[LANGUAGE_NONE][0]['value'],
                'mail' => $acc->mail
              ),
              // WSSE Authentication
              'username'  => $username,
              'digest'    => $digest,
              'nonce'     => $b64nonce,
              'created'   => $created
          ));

          $a_href = $api_host."/api/v1/carders/new.html?".$query1;

          return "<a href='$a_href'>Add to Anticarder.com</a>";
        }
      

So, in the profile template, we use this function as "echo qwintry_anticarder_create($user_profile);"

More sophisticated setup

This is a simple client-side integration, where browser of Qwintry operator makes GET requests to Anticarder.com. But, it's possible to integrate your website to Anticarder project on a lower level, for example, when your customer places an order, you can use your backend script (for example, PHP+Curl library) to make API call to Anticarder, using order details, and, if the name (or shipping address) of the customer is suspicious, send an email to your administrator. Just read our docs and contact us the you have any questions, we'll be glad to help you.