Payment Gateway Integration Process

Pademobile

The gateway operation

Pademobile's payment gateway is a 3-party payment processing service. Meaning that when a customer clicks on the payment button, Pademobile's web gets the control, process and completes the payment and returns to your web to complete the order.

Gateway process:

  • During your store's checkout process, by selecting Pademobile as a payment method, your system should call the main gateway's URL, giving the following parameters (complete specification below):

    • Transaction information to process.
    • Account id information.
    • Return URL.
    • Any information you would like to include to process or complete the order.
  • The gateway will ask for the user's Pademobile account information.
  • The system will validate the payment and give back the control to your website (to the return URL) with the following information:
    • If the transaction was successful or not.
    • If it was not, the error message.
    • The free parameters indicated.

Add the access information

First we will use the development server, the service URL is: https://staging.pademobile.com:710/comprar.

This is the test account you have to use:

country_code: ES
nick: test-shop
user_id: 559
private password: d28sxrs5zax0cmu

Prepare the call

  • You can access the gateway with a GET call (calling upon the service main URL through the query parameters). Include the following parameters:
    • user_id: Affiliate id, it is in your user profile (access with your nick and password)
    • country: affiliate country code (Mexico: mx, USA: us, Spain: es)
    • description: Purchase description
    • amount:Amount of the purchase, with "." as decimal indicator
    • url: return URL: the store's URL to finish the purchase process.
    • signature: call CRC, using the user's password to avoid external petitions.
  • You can also include any other parameter, with any name and content. Eg, you could include your internal order id, so that when you regain control you can identify the order.
  • The signature parameter is a hash HMAC of the chain call, which uses your password as a key code, and SHA1 as a code algorithm. If you get the following chain with the call:
  • requests_string = "url=http%3A%2F%2Flocalhost%3A8000%2Fback%2F&id_usuario=244¶m2=arbitrario2¶m1=arbitrario1&descripcion=test_description&pais=MX&importe=10";

    The signature parameter will calculate executing the following (depending on the program language):

    php

    signature = hash_hmac('sha1', request_string, private_key);
    In fact, you have an example you can check at PHP.

    python

    import hashlib
    import hmac
    
    def enlace_compra(self, cadena):
            firma   = hmac.new(CLAVE_PRIVADA, cadena, hashlib.sha1).hexdigest()
            return cadena + '&firma=' + firma

    Una vez tenemos la firma calculada, simplemente la incluimos al final de la cadena de parámetros, e invocamos a la URL base del servicio.

    Processing the request.

  • Once the call reaches the gateway, the system will ask for the user's Pademobile account (nick and password) to complete the payment.
  • We will send to the user's cell phone a 4-6 digit code (valid for one transaction) with which he will confirm the transaction.
  • Return URL.

  • Once the payment operation is complete, the return URL will get control, going through the following parameters (through GET, inside the call URL):
    • codtran: Pademobile's transaction id
    • sign: signature with the same process as the signature of the call of the main URL. Allowing you to make sure that the call is coming from Pademobile.
    • status: it will be true or false depending on the result, true if the transaction was completed successfully.
    • message: Transaction message. "The operation was successful", or the details if the transaction was not completed.
  • Furthermore, the additional parameters will be included.
  • Transaction confirmation.

  • When the process is complete, you can access the account at https://staging.pademobile.com:700, with the test account information.
  • You will see on your timeline (the fist screen after the login) the transactions made, including the amount and the transaction fees.
  • Next, production.

    Once the integration process is complete and everything is working accordingly, you will only have to change the URL to the production stage: https://www.pademobile.com:810/comprar. The nick and password that you indicated in the registration process will be your account information.

    Any questions?

    If you have any question send us an e-mail at info@pademobile.com and we will contact you as soon as possible.

    Thank you for choosing Pademobile!