API BLACKLIST

Last updated: May 18, 2020

Information

Step by step installation API Blacklist

This api is available for companies that need verify payments and need consult if the cards are in blacklist as cloned or hacked. Improves fraud detection rate. Reach up to 80% success to prevent fraud in the global market

Installation

Step One

download our blacklist api of github repository when you download APi Blacklist for windows is necessary that you have xampp for locals unit tests, also is necessary that configure a certified SSL in your local server, for enviroment in linux for example Ubuntu, you need configure apache for this option.

INSTAll SSL ON UBUNTU
  • Directory : location where the generated files are saved.
      sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout 
    "/Directory/localhost.key" -out "/Directory/keys/localhost.crt"

    if your installation is successfully you might look this message.

    Generating a 2048 bit RSA private key
    ........................+++
    .......+++
    writing new private key to 'localhost.key'
    -----
    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter '.', the field will be left blank.
    -----

Ubuntu ssl input parameters

Parameter Description
Country Name ISO 3166-1 alfa-3, code of your country, example: USA.
State or Province Name State where do you live.
Locality Name City name where do you live.
Organization Name your company name.
organizational unit name Example: https://localhost
Email Address Personal or company E-mail
  • Make a virtual host for https or modify default-ssl.conf

    /etc/apache2/sites-available/default-ssl.conf 
    
    Add
    
    SSLCertificateFile "/Directory/localhost.crt"
    
    SSLCertificateKeyFile "/Directory/localhost.key"
    
    <Directory> /var/www/html>
    
      AllowOverride all
    
    </Directory>
  • Run these commands in ubuntu terminal, verify if was modified the default-ssl.conf enable this site or enable the virtual host that you made.

    • sudo a2ensite default-ssl.conf 
      sudo a2enmod ssl 
      service apache2 restart
      service apache2 reload
    • the security exception for this site is added, this is done in the corresponding browser.

      Add this url in your Browser: 
      ("https://localhost/api_waiapay_ecommerce/CustomApi.php ")
    • Remember that, this url should it's in your project downloaded of github, in the route "/var/www/html/"

    Configuration SSL on windows Xampp

    Enter the xampp root directory and look the apache folder.


    Step for generate a ssl certified on Windows

    Select batch makecert

    Add the necesary information.

    Add parameters of SSL Xampp Windows

    Parameter Description
    Country Name ISO 3166-1 alfa-3, code of your country, example: USA.
    State or Province Name State where do you live.
    Locality Name City name where do you live.
    Organization Name your company name.
    Organizational Unit Name Example: https://localhost
    Email Address Personal or company E-mail.
  • The generated keys will be in the directory:

    C:/xampp/apache/conf

  • ok, in this step we going to the directory:

    apache/conf/extra

    and we opened the folder httpd-xampp and add the next information.
    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    
    # Redirect /xampp folder to https
    RewriteCond %{HTTPS} !=on
    RewriteCond %{REQUEST_URI} xampp
    RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
    
    # Redirect /phpMyAdmin folder to https
    RewriteCond %{HTTPS} !=on
    RewriteCond %{REQUEST_URI} phpmyadmin
    RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
    
    # Redirect /security folder to https
    RewriteCond %{HTTPS} !=on
    RewriteCond %{REQUEST_URI} security
    RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
    
    # Redirect /webalizer folder to https
    RewriteCond %{HTTPS} !=on
    RewriteCond %{REQUEST_URI} webalizer
    RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
    
    # Redirect /folder_name folder to https
    RewriteCond %{HTTPS} !=on
    RewriteCond %{REQUEST_URI} folder_name
    RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
    
    </IfModule> 
  • We look for the file where the virtual host httpd-vhosts in the directoy /apache/conf/extra add the next information.

    <VirtualHost *:443>
          ServerAdmin
          webmaster@dummy-host2.example.com
          DocumentRoot "C:/xampp/htdocs/"
          SSLEngine on 
          SSLCertificateFile "C:\xampp\apache\conf\ssl.crt\server.crt"
    
          SSLCertificateKeyFile "C:\xampp\apache\conf\ssl.key\server.key"
    
    </VirtualHost>
  • When you final the installation you need restart your apache and add the url in your browser https://localhost/api_waiapay_ecommerce/CustomApi.php click on accept and continue.


  • Configure Waiapay Api in your local environment

  • Information of variables

  • # Parameter Description
    1 form_waiapay_api_key Key provided by the waiapay system
    2 form_waiapay_api_nameCompany Company name registered in waiapay
    3 waiapay_api_usr_name Name cardholder
    4 waiapay_api_usr_lastname Lastname cardholder
    5 waiapay_api_usr_address Address cardholder
    6 waiapay_api_usr_country Country cardholder
    7 waiapay_api_usr_city City cardholder
    8 waiapay_api_usr_email E-mail cardholder
    9 waiapay_api_usr_cellphone Cellphone cardholder
    10 waiapay_api_cd_brand Franchise of card
    11 waiapay_api_cd_number Number of credit card
    12 waiapay_api_cd_expMonth Month of expiration card, format MM/
    13 waiapay_api_cd_expYear Year of expiration card, format /AAAA
    14 waiapay_api_cd_cardName Name of credit card
    15 waiapay_api_gd_code CVV code
    16 waiapay_api_gd_description Description of product or service
    16 waiapay_api_currency_type Type currency example USD, COP, EUR
    17 waiapay_api_gd_unitPrice Price of product or service $0.00

    Answer Api


    Sandbox environment Data

    # Number of card Message
    1 4242424242424242 Sandbox Transaction Successfully .
    2 4042000043220000 Sandbox transaction Authentication required.
    3 5555555555554400 Sandbox Target is available on Blacklist Waiapay cloned or hacked card.
    4 5188000000000000 Sandbox Payment declined for possible fraud.
    5 4199999999999999 Sandbox Transaction no successfully.
    6 2223003122003222 Sandbox Retain card and report.

    Api service responses for production environment

    # Code Message
    1 0099 This card is available on our Blacklist for cloned or hacked.
    2 0096 This card isn't available for cloned or hackced in our blacklist.

    Answer Api

    {
        "code":"0096",
        "message":"This card isn't available for cloned or hackced in our blacklist."
        }
    });