BankStore XML Integration

  1. POS configuration
  2. BANKSTORE XML Integration
    1. Execution of user registration in the system
    2. User Information
    3. User removal
    4. Execution of Charges to a user in the system
    5. Execution of Charges to a user in the system with DCC
    6. Confirmation of currency in DCC payment
    7. Refund to User in the system
    8. Execution of subscription registration in the system
    9. Editing a subscription in the system
    10. Subscription removal
    11. Execution of subscription registration of a existing user
    12. Creating a user preauthorization in the system
    13. Confirmation of a user preauthorization in the system
    14. Cancelation of a user preauthorization in the system
    15. Execution of a user registration in the system by Token
    16. Execution of Charges to a user by Reference
  3. APPENDIX I – Business signature calculation
  4. APPENDIX II – OPERATION TYPES

POS configuration

In order to use the PAYCOMET payment gateway in your business, you must have the necessary configuration parameters. These can be obtained through the PAYCOMET customer management platform at Customer Area

Once inside the platform, the configuration of the contracted product can be reviewed through the menu My products -> Configure product.

After clicking the "Edit" button of the chosen product, a screen will appear with the basic information of the product under the section "Technical configuration of the WEB POS". Specifically, the information required during the integration process is:

BANKSTORE XML Integration

Since the entire payment process is performed in the background (server to server) the changes to be performed in the business are totally unrelated to the user experience.

The technology used for the operation with the PAYCOMET payment gateway is SOAP, based on HTTPS to prevent transportation problems through firewalls and other devices while ensuring the safety of operations. There is extensive support for carrying out SOAP requests for the major programming languages used in web environments.

The requests are made through the HTTPS transport protocol, so you must ensure that your system is capable of correctly performing requests and managing security certificates returned by the platform to ensure proper use.

There are several operations that can be launched from the same service. The available operations are described below.

Execution of user registration in the system

Function: (add_user)

The variables required to register a user with their bank details are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_MERCHANT_PAN [0-9]{16,19} Mandatory. Card number, without any spaces or dashes
DS_MERCHANT_EXPIRYDATE [0-9]{4} Mandatory. Expiry date of the card, expressed as “mmyy” (two-digits for the month and two-digits for the year)
DS_MERCHANT_CVV2 [0-9]{3,4} Mandatory. CVC2 Code of the card
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction (owner of the card)

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_IDUSER [0-9]{1,13} Unique identifier of the user registered in the system. It will come back empty in the case of error.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Token code associated with the DS_IDUSER.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.

If the request generates an error of some kind (incorrect signature, incorrect amount, user not found, etc) all fields will be empty, except “DS_ERROR_ID” which will contain the error code.

If the transaction is correct, the service will return the field DS_IDUSER and DS_TOKEN_USER which shall be stored by the business, associating it to the account of their customer, to subsequently make charges on their credit/debit card.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:add_user xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_MERCHANT_PAN type="xsd:string"> 1234 5678 9012 3456  </DS_MERCHANT_PAN>
        <DS_MERCHANT_EXPIRYDATE type="xsd:string"> 0535  </DS_MERCHANT_EXPIRYDATE>
        <DS_MERCHANT_CVV2 type="xsd:string"> 123  </DS_MERCHANT_CVV2>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        <DS_MERCHANT_CARDHOLDERNAME type="xsd:string"> Francisco y Meta  </DS_MERCHANT_CARDHOLDERNAME>
        </mns:add_user>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function addUser()
{
    $endPoint     = "https:api.paycomet.com/gateway/xml-bankstore?wsdl";
    $merchantCode = "123456";
    $terminal     = "1234";
    $password     = "yourpasswd";

    $signature = hash("sha512",
        $merchantCode
        . $token
        . $jetID
        . $terminal
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];

    try {
        $clientSOAP = new SoapClient($endPoint);

        $addUserResponse
            = $clientSOAP->add_user(
                $merchantCode,
                $terminal,
                $merchantPan,
                $merchantExpiryDate,
                $mtrchantCVV2,
                $signature,
                $ip
            );

        if ($addUserResponse["DS_RESPONSE"] == "1") {
             OK
            return true;
        } else {
            KO
            var_dump($addUserResponse["DS_ERROR_ID"]);
            return false;
        }
    } catch (SoapFault $e) {
        var_dump($e);
    }
}

public ServiceResponse add_user(String[] args) throws Exception {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String pan = args[4];
    String expirydate = args[5];
    String cvv2 = args[6];
    String cardholdername = args[7];
    String expirydate = args[8];

    merchantsignature = makeSHA1hash(merchantcode + pan + cvv2 + terminal + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("add_user");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_MERCHANT_PAN", pan);
    soapReq.addProperty("DS_MERCHANT_EXPIRYDATE", expirydate);
    soapReq.addProperty("DS_MERCHANT_CVV2", cvv2);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);
    soapReq.addProperty("DS_MERCHANT_CARDHOLDERNAME", cardholdername);

    return callSoap(result, soapReq);

}

User Information

Function: (info_user)

This function will be used to confirm to the customers of the business which card will be used to make the payment. This step is optional but it is convenient to avoid mistrust.

The variables required to request information from a user are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction (owner of the card)

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_MERCHANT_PAN [0-9]{16,19} Card number. The number will be returned masked, showing just the first six digits and the last four.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.
DS_CARD_BRAND [a-zA-Z]{30} Card brand. If it can be identified, information on the card brand will be sent (Visa, MasterCard, American Express, etc). Otherwise, the field will be returned blank.
DS_CARD_TYPE [a-zA-Z]{20} Type of card. If it can be identified, information on the type of card will be sent (DEBIT, CREDIT, etc). Otherwise, the field will be returned blank.
DS_CARD_I_COUNTRY_ISO3 [a-zA-Z]{3} ISO3 Code the country of the issuer of the card. If it can be identified, the ISO3 Code of the country of the issuer of the card will be sent. Otherwise, the field will be returned blank.
DS_EXPIRYDATE [YYYY/MM] Expiry date of the card expressed in the format YYYY/MM
DS_CARD_HASH [a-zA-Z0-9]{64} Hash unique credit card id
DS_CARD_CATEGORY [a-zA-Z0-9]{16} Card category
DS_SEPA_CARD [0-1]{1} Card in SEPA country
DS_PSD2_CARD [Y|N|NA] Express if card has PSD2 information (Y is a PSD2 card, N is not and NA is not available).
DS_TOKEN_COF [0|1] Express if card has COF registered (1 as COF registered, otherwise will be 0).
DS_EEA_CARD [Y|N|NA] Express if card country belongs to EEA zone or not. (Y is a EEA card, N is not and NA is not available).

If the request generates an error of some kind (incorrect signature, user not found, etc) all fields will be delivered empty, except “DS_ERROR_ID” which will contain the error code.

If the transaction is correct, the service will return the field DS_MERCHANT_PAN which will contain the credit/debit card masked, leaving visible only the first 6 digits and the last 4. This operation is very useful to show the customer of the business the card with which the transaction will be made.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:info_user xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        </mns:info_user>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function infoUser()
{
    $endPoint = "https:api.paycomet.com/gateway/xml-bankstore?wsdl";
    $merchantCode = "123456";
    $terminal = "1234";
    $password = "yourpasswd";

    $signature = hash("sha512",
        $merchantCode
        . $token
        . $jetID
        . $terminal
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];

    try {
        $clientSOAP = new SoapClient($endPoint);

        $addUserResponse = $clientSOAP->add_user(
            $merchantCode,
            $terminal,
            $merchantPan,
            $merchantExpiryDate,
            $mtrchantCVV2,
            $signature,
            $ip
        );

        if ($addUserResponse["DS_RESPONSE"] == "1") {
             OK
            $infoUser = $clientSOAP->info_user(
                $merchantCode,
                $terminal,
                $addUserResponse["DS_IDUSER"],
                $addUserResponse["DS_USER_TOKEN"],
                $signature,
                $ip
            );
            var_dump($infoUser);
            return true;
        } else {
            KO
            var_dump($addUserResponse["DS_ERROR_ID"]);
            return false;
        }
    } catch (SoapFault $e) {
        var_dump($e);
    }
}


        
public ServiceResponse info_user(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("info_user");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", tokenuser);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);

    return callSoap(result, soapReq);
}

User removal

Function: (remove_user)

This function will be used for removing a user from the account of the business.

The variables required to request removal of a user are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction (owner of the card)

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_RESPONSE [0-1]{1} Result of operation. 0 or empty will be erroneous operation and 1 operation completed.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.

If the request generates an error of some kind (incorrect signature, user not found, etc) all fields will be delivered empty, except “DS_ERROR_ID” which will contain the error code.

If the transaction is correct, the service will return the field DS_RESPONSE the value of which will be 0 or empty in case of error and 1 in case of successful removal.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:remove_user xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        </mns:remove_user>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


function removeUser(
    $idpayuser,
    $tokenpayuser
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->remove_user(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $signature,
            $ip
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse remove_user(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("remove_user");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", tokenuser);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);

    return callSoap(result, soapReq);
}

Execution of Charges to a user in the system

Function: (execute_purchase)

Once the user is registered in the system, charges may be made to their account by sending their credentials and data of the operation.

The variables required for making a charge to a user registered in the system are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_MERCHANT_AMOUNT [0-9]{1,8} Mandatory. Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Mandatory. Reference of the operation. Must be unique on every valid transaction.
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY] Mandatory. Currency of the transaction. See more information in CURRENCY CODES
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction (owner of the card)
DS_MERCHANT_PRODUCTDESCRIPTION [a-zA-Z0-9]{125} Optional. Description of the product
DS_MERCHANT_OWNER [a-zA-Z0-9]{1,40} Optional. Description of the transaction
DS_MERCHANT_SCORING [0-100] Optional. Valor de scoring de riesgo de la transacción. Entre 0 y 100.
DS_MERCHANT_DATA
JSON Optional. Client authentication information. The more information is provided in this field, the more likely the authorisation of the operation will be without requiring additional authentication. For this reason, it is recommended to send as much information as possible. See detail
DS_MERCHANT_MERCHANTDESCRIPTOR [A-Za-z0-9]{1,25} Optional. Allows the business to send a text up to 25 characters that will be printed on the customer invoice. Limited to simple characters, no accents or special characters.
DS_MERCHANT_SCA_EXCEPTION
[LWV|TRA|MIT|COR|MOT] Optional TYPE OF EXCEPTION TO THE SECURE PAYMENT. If not specified, PAYCOMET will try to assign it the most appropriate possible. See detail
DS_MERCHANT_TRX_TYPE [I|R|H|E|D|M|N|C]  Conditional Obligatory only if an MIT exception has been selected in the MERCHANT_SCA_EXCEPTION field. See detail
DS_USER_INTERACTION
[0|1] Optional. Indicates wether the business can interact with the customer

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_MERCHANT_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Reference of the operation.
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY] Currency of the transaction. See more information in MONEDAS
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Authorization bank code of the transaction (required to execute a return).
DS_MERCHANT_CARDCOUNTRY [0-9]{1,3} Country of the issuer of the card in ISO3 Code (ex.: 724 = Spain). May be left empty.
DS_RESPONSE [0-1]{1} Result of operation. 0 or empty will be erroneous operation and 1 operation completed.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.
DS_CHALLENGE_URL [A-Za-z0-9]{250} If the parameter DS_USER_INTERACTION was set to 1, then it'll contain the URL where te business will have to redirect the customer

If the request generates an error of some kind (incorrect signature, user not found, etc) all fields will be delivered empty, except “DS_ERROR_ID” which will contain the error code.

If the transaction is correct, the service will return the field DS_RESPONSE the value of which will be 0 or empty in case of error and 1 in case of successful removal.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:execute_purchase xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_AMOUNT type="xsd:string"> 1234 </DS_MERCHANT_AMOUNT>
        <DS_MERCHANT_ORDER type="xsd:string"> unique_operation_reference </DS_MERCHANT_ORDER>
        <DS_MERCHANT_CURRENCY type="xsd:string"> EUR </DS_MERCHANT_CURRENCY>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        <DS_MERCHANT_PRODUCTDESCRIPTION type="xsd:string"> Product description </DS_MERCHANT_PRODUCTDESCRIPTION>
        <DS_MERCHANT_OWNER type="xsd:string"> Card Owner  </DS_MERCHANT_OWNER>
        <DS_MERCHANT_SCORING type="xsd:integer"> 90 </DS_MERCHANT_SCORING>
        <DS_MERCHANT_DATA type="xsd:string"> Comerce Data </DS_MERCHANT_DATA>
        <DS_MERCHANT_MERCHANTDESCRIPTOR type="xsd:string"> Commerce descriptor </DS_MERCHANT_MERCHANTDESCRIPTOR>
        <DS_MERCHANT_SCA_EXCEPTION type="xsd:string"> MIT </DS_MERCHANT_SCA_EXCEPTION>
        <DS_MERCHANT_TRX_TYPE type="xsd:string"/> I </DS_MERCHANT_TRX_TYPE>
        <DS_ESCROW_TARGETS type="xsd:string"/> income recipient data </DS_ESCROW_TARGETS>
        <DS_USER_INTERACTION type="xsd:integer"/> 0 </DS_USER_INTERACTION>
        </mns:execute_purchase>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function executePurchase(
    $idpayuser,
    $tokenpayuser,
    $amount,
    $transreference,
    $currency,
    $productdescription,
    $owner,
    $scoring = null,
    $merchant_data = null,
    $merchant_description = null,
    $merchant_sca_exception = null,
    $merchant_trx_type = null,
    $escrow_targets = null,
    $user_interaction = null

) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $amount
        . $transreference
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->execute_purchase(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $amount,
            $transreference,
            $currency,
            $signature,
            $ip,
            $productdescription,
            $owner,
            $scoring,
            $merchant_data,
            $merchant_description,
            $merchant_sca_exception,
            $merchant_trx_type,
            $escrow_targets,
            $user_interaction
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse execute_purchase(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];
    String amount = args[6];
    String orderid = args[7];
    String currency = args[8];
    String productdescription = args[9];
    String cardholder = args[10];
    Integer scoring = args[11];
    String merchant_data = args[12];
    String merchantdescriptor = args[13];
    String merchant_sca_exception = args[14];
    String merchant_trx_type = args[15];
    String escrow_targets = args[16];
    Integer user_interaction = args[17];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + amount + orderid + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("execute_purchase");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", tokenuser);
    soapReq.addProperty("DS_MERCHANT_AMOUNT", amount);
    soapReq.addProperty("DS_MERCHANT_ORDER", orderid);
    soapReq.addProperty("DS_MERCHANT_CURRENCY", currency);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);
    soapReq.addProperty("DS_MERCHANT_PRODUCTDESCRIPTION", productdescription);
    soapReq.addProperty("DS_MERCHANT_OWNER", cardholder);
    soapReq.addProperty("DS_MERCHANT_SCORING", scoring);
    soapReq.addProperty("DS_MERCHANT_DATA", merchant_data);
    soapReq.addProperty("DS_MERCHANT_MERCHANTDESCRIPTOR", merchantdescriptor);
    soapReq.addProperty("DS_MERCHANT_SCA_EXCEPTION", merchant_sca_exception);
    soapReq.addProperty("DS_MERCHANT_TRX_TYPE", merchant_trx_type);
    soapReq.addProperty("DS_ESCROW_TARGETS", escrow_targets);
    soapReq.addProperty("DS_USER_INTERACTION", user_interaction);

    return callSoap(result, soapReq);
}

Execution of Charges to a user in the system with DCC

Function: (execute_purchase_dcc)

Once the user is registered on the system, they can make payments with their account by sending their credentials and operation information. The DCC caseload requires that a payment process is carried out in two steps: execute_purchase_dcc, where the native currency of the card is received (in the case of the card having the same currency as the product associated with the transaction, the result will be a 1:1 conversion) and will be subsequently confirmed with the confirm_purchase_dcc method with the selected currency and the original session of the transaction.

The variables that the service requires for carrying out a DCC payment for a user registered in the system are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_MERCHANT_AMOUNT [0-9]{1,8} Mandatory. Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Mandatory. Reference of the operation. Must be unique on every valid transaction.
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the application of the business
DS_MERCHANT_PRODUCTDESCRIPTION [a-zA-Z0-9]{125} Optional. Description of the product
DS_MERCHANT_OWNER [a-zA-Z0-9]{40} Optional. Description of the transaction
DS_MERCHANT_MERCHANTDESCRIPTOR [A-Za-z0-9]{1,25} Optional. Allows the business to send a text up to 25 characters that will be printed on the customer invoice. Limited to simple characters, no accents or special characters.

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_MERCHANT_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Reference of the operation.
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY] Transaction currency. It will always be the same as the original product.
DS_MERCHANT_DCC_SESSION [a-zA-Z0-9]{1,40} Session var for later confirmation of the authorization. This value must be stored to confirm payment in the currency chosen by the end user.
DS_MERCHANT_DCC_CURRENCY [EUR][USD][GBP][JPY] Native currency of the customer's card.
DS_MERCHANT_DCC_CURRENCYISO3 [0-9]{1,3} Native currency of the customer's card in ISO3
DS_MERCHANT_DCC_CURRENCYNAME [A-Za-z0-9]{1,20} Literal currency in string. If the native currency is the same as the product PAYCOMET, este campo vendrá con valor 0.
DS_MERCHANT_DCC_EXCHANGE [0-9]*\.?[0-9]* Currency exchange rate. Return string but it will come in format float.
DS_MERCHANT_DCC_AMOUNT [0-9]{1,8} Amount of the operation in whole format. 1,00 EURO = 100, 4,50 EUROS = 450...
DS_MERCHANT_DCC_MARKUP [0-9]*\.?[0-9]* Percentage value in float of DCC margin applied by the financial institution. Por ejemplo: 0.03 será un 3%
DS_MERCHANT_DCC_CARDCOUNTRY [0-9]{1,3} Country of the issuer of the card in ISO3 Code (ex.: 724 = Spain).
DS_RESPONSE [0-1]{1} Result of operation. 0 or empty will be erroneous operation and 1 operation completed.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.

If the request generates an error of some kind (incorrect signature, incorrect amount, user not found, etc) all fields will be empty, except “DS_ERROR_ID” which will contain the error code.

In case of the transaction being correct, the service will restore all fields. In this case the DS_ERROR_ID field will be restored empty. The information to save for the confirmation of the operation is the DS_MERCHANT_DCC_SESSION which is a unique transaction identifier linking the purchase operation initiated on DCC. In the following step the currency must be confirmed for finalising the transaction and linking to the DCC session.

DCC payment is not fully available in test environment. This function will make the payment directly and it won't return a dcc session id.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:execute_purchase_dcc xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_AMOUNT type="xsd:string"> 1234 </DS_MERCHANT_AMOUNT>
        <DS_MERCHANT_ORDER type="xsd:string"> unique_operation_reference </DS_MERCHANT_ORDER>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        <DS_MERCHANT_PRODUCTDESCRIPTION type="xsd:string"> Product description </DS_MERCHANT_PRODUCTDESCRIPTION>
        <DS_MERCHANT_OWNER type="xsd:string"> Card Owner  </DS_MERCHANT_OWNER>
        <DS_MERCHANT_MERCHANTDESCRIPTOR type="xsd:string"> Commerce descriptor </DS_MERCHANT_MERCHANTDESCRIPTOR>
        </mns:execute_purchase_dcc>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function executePurchaseDcc(
    $idpayuser,
    $tokenpayuser,
    $amount,
    $transreference,
    $productdescription = false,
    $owner = false,
    $merchant_description = null
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $amount
        . $transreference
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->execute_purchase_dcc(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $amount,
            $transreference,
            $signature,
            $ip,
            $productdescription,
            $owner,
            $merchant_description
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}
       
public ServiceResponse execute_purchase_dcc(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];
    String amount = args[6];
    String orderid = args[7];
    String productdescription = args[8];
    String cardholder = args[9];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + amount + orderid + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("execute_purchase_dcc");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", tokenuser);
    soapReq.addProperty("DS_MERCHANT_AMOUNT", amount);
    soapReq.addProperty("DS_MERCHANT_ORDER", orderid);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);
    soapReq.addProperty("DS_MERCHANT_PRODUCTDESCRIPTION", productdescription);
    soapReq.addProperty("DS_MERCHANT_OWNER", cardholder);

    return callSoap(result, soapReq);
}

Confirmation of currency in DCC payment

Function: (confirm_purchase_dcc)

Once the DS_MERCHANT_DCC_SESSION parameter has been restored when a DCC purchase has been made, the state of the transaction will be “waiting” for the currency confirmation. The business must suggest to the client the currency in which they wish to pay (showing the conversion in real time) and when it is selected, the business must confirm the authorisation with the currency selected by the end user.

(example of interaction with the end user)

The variables required for confirming a DCC operation on the system are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Mandatory. Reference original operation.
DS_MERCHANT_DCC_CURRENCY [EUR][USD][GBP][JPY][...] Mandatory. The chosen currency transaction. It may be the product PAYCOMET native or by the end user selected. The amount will be sent in execute_purchase_dcc if it is the same product and become if different.
DS_MERCHANT_DCC_SESSION [a-zA-Z0-9]{1,40} Mandatory. Sent in the same session process execute_purchase_dcc.
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_MERCHANT_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Reference of the operation.
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY][...] Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Authorization bank code of the transaction (required to execute a return).
DS_MERCHANT_CARDCOUNTRY [0-9]{1,3} Country of the issuer of the card in ISO3 Code (ex.: 724 = Spain). May be left empty.
DS_RESPONSE [0-1]{1} Result of operation. 0 or empty will be erroneous operation and 1 operation completed.
DS_ERROR_ID [0-9]{1,5} On error, here come the error code generated. If not exits will be 0 or empty in case of error and 1 in case of successful removalerror vendrá 0 o vacío. Los códigos de error vienen especificados en el apartado: CÓDIGOS DE ERROR.

If the request generates an error of some kind (incorrect signature, incorrect amount, user not found, etc) all fields will be empty, except “DS_ERROR_ID” which will contain the error code.

In case of the transaction being correct, the service will restore all fields (except DS_MERCHANT_CARDCOUNTRY which is optional) which must be stored by the business in case of a possible refund. In this case the field DS_ERROR_ID will be restored with the value 0.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:confirm_purchase_dcc xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_MERCHANT_ORDER type="xsd:string"> unique_operation_reference </DS_MERCHANT_ORDER>
        <DS_MERCHANT_DCC_CURRENCY type="xsd:string"> EUR </DS_MERCHANT_DCC_CURRENCY>
        <DS_MERCHANT_DCC_SESSION type="xsd:string"> dccsession  </DS_MERCHANT_DCC_SESSION>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        </mns:confirm_purchase_dcc>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function confirmPurchaseDcc(
    $transreference,
    $dcccurrency,
    $dccsession
) {
    $signature = hash("sha512",
        $merchantCode
        . $terminal
        . $transreference
        . $dcccurrency
        . $dccsession
        . $password
    );
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->confirm_purchase_dcc(
            $merchantCode,
            $terminal,
            $transreference,
            $dcccurrency,
            $dccsession,
            $signature
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse confirm_purchase_dcc(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String ipaddr = args[2];
    String orderid = args[3];
    String dcccurrency = args[4];
    String dccsession = args[5];

    merchantsignature = makeSHA1hash(merchantcode + terminal + orderid + dcccurrency + dccsession);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("confirm_purchase_dcc");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_MERCHANT_ORDER", orderid);
    soapReq.addProperty("DS_MERCHANT_DCC_CURRENCY", dcccurrency);
    soapReq.addProperty("DS_MERCHANT_DCC_SESSION", dccsession);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);

    return callSoap(result, soapReq);
}

Refund to User in the system

Function: (execute_refund)

By means of this function, refunds of the operations performed may be made. The user identification data and the bank authorization code will be necessary.

The variables required for making a refund of an operation are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Mandatory. Original bank code of the authorization of the transaction
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Mandatory. Original reference of the operation.
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY] Mandatory. Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the application of the business
DS_MERCHANT_AMOUNT [0-9]{1,8} Optional. For partial refunds. Amount to be refunded in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_MERCHANTDESCRIPTOR [A-Za-z0-9]{1,25} Optional. Allows the business to send a text up to 25 characters that will be printed on the customer invoice. Limited to simple characters, no accents or special characters.

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Reference of the operation.
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY] Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Authentication bank code of the transaction.
DS_RESPONSE [0-1]{1} Result of operation. 0 or empty will be erroneous operation and 1 operation completed.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.

If the request generates an error of some kind (incorrect signature, incorrect amount, user not found, etc) all fields will be empty, except “DS_ERROR_ID” which will contain the error code.

If the transaction is correct, the service will return all fields. In this case the field DS_ERROR_ID will be returned empty. The service will return the field DS_RESPONSE the value of which will be 0 or empty in case of error and 1 in case of successful refund.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:execute_refund xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_AUTHCODE type="xsd:string"> merchantauthcode </DS_MERCHANT_AUTHCODE>
        <DS_MERCHANT_ORDER type="xsd:string"> unique_operation_reference </DS_MERCHANT_ORDER>
        <DS_MERCHANT_CURRENCY type="xsd:string"> EUR </DS_MERCHANT_CURRENCY>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        <DS_MERCHANT_AMOUNT type="xsd:string"> 1234 </DS_MERCHANT_AMOUNT>
        <DS_MERCHANT_MERCHANTDESCRIPTOR type="xsd:string"> Commerce descriptor </DS_MERCHANT_MERCHANTDESCRIPTOR>
        </mns:execute_refund>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function executeRefund(
    $idpayuser,
    $tokenpayuser,
    $transreference,
    $currency,
    $authcode,
    $amount = null,
    $merchant_description = null
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $authcode
        . $transreference
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->execute_refund(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $authcode,
            $transreference,
            $currency,
            $signature,
            $ip,
            $amount,
            $merchant_description
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse execute_refund(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];
    String orderid = args[6];
    String currency = args[7];
    String authcode = args[8];
    String amount = args[9];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + authcode + orderid + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("execute_refund");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", tokenuser);
    soapReq.addProperty("DS_MERCHANT_AUTHCODE", authcode);
    soapReq.addProperty("DS_MERCHANT_ORDER", orderid);
    soapReq.addProperty("DS_MERCHANT_CURRENCY", currency);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);
    soapReq.addProperty("DS_MERCHANT_AMOUNT", amount);

    return callSoap(result, soapReq);
}

Execution of subscription registration in the system

Function: (create_subscription)

The registration of a subscription implies the registration of a user in the BankStore system of PAYCOMET. This process is completely independent from the isolated charge to a customer of the business.

The variables required for registering a user with subscription are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_MERCHANT_PAN [0-9]{16,19} Mandatory. Card number, without any spaces or dashes
DS_MERCHANT_EXPIRYDATE [0-9]{4} Mandatory. Expiry date of the card, expressed as “mmyy” (two-digits for the month and two-digits for the year)
DS_MERCHANT_CVV2 [0-9]{3,4} Mandatory. CVC2 Code of the card
DS_SUBSCRIPTION_STARTDATE [YYYY-MM-DD] Mandatory. Subscription start date. If the value is empty the date is the same day of registration. IMPORTANT: Subscriptions are charged on the first run if this field has value it will be taken into account for future charges.
DS_SUBSCRIPTION_ENDDATE [YYYY-MM-DD] Mandatory. Subscription end date. It may not be later than the Subscription start date + 5 years.
DS_SUBSCRIPTION_ORDER [A-Za-z0-9]{1,20} Mandatory. First characters of the reference of the operation. IMPORTANT: Do not include the characters “[“ o “]”, they will be used to recognize the user of the business.
DS_SUBSCRIPTION_PERIODICITY [0-9]{3} Mandatory. Frequency of collection from the start date. The number expresses Days. It may not be greater than 365 days.
DS_SUBSCRIPTION_AMOUNT [0-9]{1,8} Mandatory. Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_SUBSCRIPTION_CURRENCY [EUR][USD][GBP][JPY] Mandatory. Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction (owner of the card)
DS_MERCHANT_SCORING [0-100] Optional. Valor de scoring de riesgo de la transacción. Entre 0 y 100.
DS_MERCHANT_DATA
JSON Optional. Client authentication information. The more information is provided in this field, the more likely the authorisation of the operation will be without requiring additional authentication. For this reason, it is recommended to send as much information as possible. See detail
DS_MERCHANT_SCA_EXCEPTION
[LWV|TRA|MIT|COR|MOT] Optional TYPE OF EXCEPTION TO THE SECURE PAYMENT. If not specified, PAYCOMET will try to assign it the most appropriate possible. See detail
DS_MERCHANT_TRX_TYPE [I|R|H|E|D|M|N|C]  Conditional Obligatory only if an MIT exception has been selected in the MERCHANT_SCA_EXCEPTION field. See detail
DS_USER_INTERACTION
[0|1] Optional. Indicates wether the business can interact with the customer

Example:

DS_SUBSCRIPTION_ORDER = Luis_3268314

The charge of the subscription to DS_IDUSER 32 on December 23, 2030 the system will return it as DS_SUBSCRIPTION_ORDER:

DS_SUBSCRIPTION_ORDER = Luis_3268314[23]20301223

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_IDUSER [0-9]{1,13} Unique identifier of the user registered in the system. It will come back empty in the case of error.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Token code associated with the DS_IDUSER.
DS_SUBSCRIPTION_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_SUBSCRIPTION_ORDER [A-Za-z0-9]{1,20} Original reference of the operation + [DS_IDUSER] + date of the transaction in format YYYYMMDD.
DS_SUBSCRIPTION_CURRENCY [EUR][USD][GBP][JPY] Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Authentication bank code of the transaction.
DS_MERCHANT_CARDCOUNTRY [0-9]{1,3} Country of the issuer of the card in ISO3 Code (ex.: 724 = Spain). May be left empty.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.
DS_CHALLENGE_URL [A-Za-z0-9]{250} If the parameter DS_USER_INTERACTION was set to 1, then it'll contain the URL where te business will have to redirect the customer

If the request generates an error of some kind (incorrect signature, incorrect amount, user not found, etc) all fields will be empty, except “DS_ERROR_ID” which will contain the error code.

If the transaction is correct, the service will return the fields DS_IDUSER and DS_TOKEN_USER which shall be stored by the business, associating it to the account of their customer, to later modify the subscription or cancel the subscription.

If the execution of the first installment is successful the system will return all the fields except DS_ERROR_ID which will be left empty.

If the execution of the first installment has an error for several reasons (balance, validity of the card, etc...), the subscription will be canceled having to create a new subscription. In this case only DS_ERROR_ID will be returned with the specific error code.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:create_subscription xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_MERCHANT_PAN type="xsd:string"> 1234 5678 9012 3456  </DS_MERCHANT_PAN>
        <DS_MERCHANT_EXPIRYDATE type="xsd:string"> 0535  </DS_MERCHANT_EXPIRYDATE>
        <DS_MERCHANT_CVV2 type="xsd:string"> 123  </DS_MERCHANT_CVV2>
        <DS_SUBSCRIPTION_STARTDATE type="xsd:string"> 2034-05-21 </DS_SUBSCRIPTION_STARTDATE>
        <DS_SUBSCRIPTION_ENDDATE type="xsd:string"> 2035-06-25 </DS_SUBSCRIPTION_ENDDATE>
        <DS_SUBSCRIPTION_ORDER type="xsd:string"> subscritionorder </DS_SUBSCRIPTION_ORDER>
        <DS_SUBSCRIPTION_PERIODICITY type="xsd:string"> 15 </DS_SUBSCRIPTION_PERIODICITY>
        <DS_SUBSCRIPTION_AMOUNT type="xsd:string"> 1234 </DS_SUBSCRIPTION_AMOUNT>
        <DS_SUBSCRIPTION_CURRENCY type="xsd:string"> EUR </DS_SUBSCRIPTION_CURRENCY>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        <DS_EXECUTE" type="xsd:integer>
        <DS_MERCHANT_CARDHOLDERNAME type="xsd:string"> Francisco y Meta  </DS_MERCHANT_CARDHOLDERNAME>
        <DS_MERCHANT_SCORING type="xsd:integer"> 90 </DS_MERCHANT_SCORING>
        <DS_MERCHANT_DATA type="xsd:string"> Comerce Data </DS_MERCHANT_DATA>
        <DS_MERCHANT_SCA_EXCEPTION type="xsd:string"> MIT </DS_MERCHANT_SCA_EXCEPTION>
        <DS_MERCHANT_TRX_TYPE type="xsd:string"/> I </DS_MERCHANT_TRX_TYPE>
        <DS_ESCROW_TARGETS type="xsd:string"/> income recipient data </DS_ESCROW_TARGETS>
        <DS_USER_INTERACTION type="xsd:integer"/> 0 </DS_USER_INTERACTION>
        </mns:create_subscription>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function createSubscription(
    $pan,
    $expdate,
    $cvv,
    $startdate,
    $enddate,
    $transreference,
    $periodicity,
    $amount,
    $currency,
    $ownerName = null,
    $scoring = null,
    $merchant_data = null,
    $merchant_sca_exception = null,
    $merchant_trx_type = null,
    $escrow_targets = null,
    $user_interaction = null
) {
    $pan = preg_replace(
        '/\s+/',
        '',
        $pan
    );
    $expdate = preg_replace(
        '/\s+/',
        '',
        $expdate
    );
    $cvv = preg_replace(
        '/\s+/',
        '',
        $cvv
    );
    $signature = hash("sha512",
        $merchantCode
        . $pan
        . $cvv
        . $terminal
        . $amount
        . $currency
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->create_subscription(
            $merchantCode,
            $terminal,
            $pan,
            $expdate,
            $cvv,
            $startdate,
            $enddate,
            $transreference,
            $periodicity,
            $amount,
            $currency,
            $signature,
            $ip,
            1,
            $ownerName,
            $scoring,
            $merchant_data,
            $merchant_sca_exception,
            $merchant_trx_type,
            $escrow_targets,
            $user_interaction
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse create_subscription(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String pan = args[4];
    String expirydate = args[5];
    String cvv2 = args[6];
    String startdate = args[7];
    String enddate = args[8];
    String orderid = args[9];
    String periodicity = args[10];
    String amount = args[11];
    String currency = args[12];
    String cardholder = args[13];
    Integer scoring = args[14];
    String merchant_data = args[15];
    String merchantdescriptor = args[16];
    String merchant_sca_exception = args[17];
    String merchant_trx_type = args[18];
    String escrow_targets = args[19];
    Integer user_interaction = args[20];

    merchantsignature = makeSHA1hash(merchantcode + pan + cvv2 + terminal + amount + currency + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("create_subscription");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("pan", dS_MERCHANT_PAN);
    soapReq.addProperty("DS_MERCHANT_EXPIRYDATE", expirydate);
    soapReq.addProperty("DS_MERCHANT_CVV2", cvv2);
    soapReq.addProperty("DS_SUBSCRIPTION_STARTDATE", startdate);
    soapReq.addProperty("DS_SUBSCRIPTION_ENDDATE", enddate);
    soapReq.addProperty("DS_SUBSCRIPTION_ORDER", orderid);
    soapReq.addProperty("DS_SUBSCRIPTION_PERIODICITY", periodicity);
    soapReq.addProperty("DS_SUBSCRIPTION_CURRENCY", currency);
    soapReq.addProperty("DS_SUBSCRIPTION_AMOUNT", amount);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);
    soapReq.addProperty("DS_MERCHANT_CARDHOLDERNAME", cardholder);
    soapReq.addProperty("DS_MERCHANT_SCORING", scoring);
    soapReq.addProperty("DS_MERCHANT_DATA", merchant_data);
    soapReq.addProperty("DS_MERCHANT_MERCHANTDESCRIPTOR", merchantdescriptor);
    soapReq.addProperty("DS_MERCHANT_SCA_EXCEPTION", merchant_sca_exception);
    soapReq.addProperty("DS_MERCHANT_TRX_TYPE", merchant_trx_type);
    soapReq.addProperty("DS_ESCROW_TARGETS", escrow_targets);
    soapReq.addProperty("DS_USER_INTERACTION", user_interaction);

    return callSoap(result, soapReq);
}

Editing a subscription in the system

Function: (edit_subscription)

If a user renews their subscription or simply wants to increase the payment of the service we offer the service of editing a subscription. In this case it will not be possible to change the currency nor the bank details of the customer of the business. The modification of the subscription involves the prior registration of a user in subscription mode in the BankStore system of PAYCOMET. This process is completely independent from the isolated charge to a customer of the business.

The variables required for editing a subscription are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_SUBSCRIPTION_STARTDATE [YYYY-MM-DD] Mandatory. Subscription start date. If the value is empty the date is the same day of registration. IMPORTANT: Subscriptions are charged on the first run if this field has value it will be taken into account for future charges.
DS_SUBSCRIPTION_ENDDATE [YYYY-MM-DD] Mandatory. Subscription end date.
DS_SUBSCRIPTION_PERIODICITY [0-9]{3} Mandatory. Frequency of collection from the start date. The number expresses Days.
DS_SUBSCRIPTION_AMOUNT [0-9]{1,8} Mandatory. Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction (owner of the card)

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_IDUSER [0-9]{1,13} Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Token code associated with the DS_IDUSER.
DS_SUBSCRIPTION_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_SUBSCRIPTION_ORDER [A-Za-z0-9]{1,20} Original reference of the operation + [DS_IDUSER] + date of the transaction in format YYYYMMDD.
DS_SUBSCRIPTION_CURRENCY [EUR][USD][GBP][JPY] Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Authentication bank code of the transaction.
DS_MERCHANT_CARDCOUNTRY [0-9]{1,3} Country of the issuer of the card in ISO3 Code (ex.: 724 = Spain). May be left empty.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.

If the request generates an error of some kind (incorrect signature, incorrect amount, user not found, etc) all fields will be empty, except “DS_ERROR_ID” which will contain the error code.

If the execution of the first installment is successful the system will return all the fields except DS_ERROR_ID which will be left empty.

If the execution of the first installment has an error for several reasons (balance, validity of the card, etc...), the subscription will be canceled having to create a new subscription. In this case only DS_ERROR_ID will be returned with the specific error code.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:edit_subscription xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_SUBSCRIPTION_STARTDATE type="xsd:string"> 2034-05-21 </DS_SUBSCRIPTION_STARTDATE>
        <DS_SUBSCRIPTION_ENDDATE type="xsd:string"> 2035-06-25 </DS_SUBSCRIPTION_ENDDATE>
        <DS_SUBSCRIPTION_PERIODICITY type="xsd:string"> 15 </DS_SUBSCRIPTION_PERIODICITY>
        <DS_SUBSCRIPTION_AMOUNT type="xsd:string"> 1234 </DS_SUBSCRIPTION_AMOUNT>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_EXECUTE" type="xsd:integer>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        </mns:edit_subscription>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function editSubscription(
    $idpayuser,
    $tokenpayuser,
    $startdate,
    $enddate,
    $periodicity,
    $amount,
    $execute
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $amount
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->edit_subscription(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $startdate,
            $enddate,
            $periodicity,
            $amount,
            $signature,
            $execute,
            $ip
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse edit_subscription(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];
    String subscriptionstartdate = args[6];
    String subscriptionenddate = args[7];
    String subscriptionperiodicity = args[8];
    String subscriptionamount = args[9];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + DS_SUBSCRIPTION_AMOUNT + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("edit_subscription");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_SUBSCRIPTION_STARTDATE", subscriptionstartdate);
    soapReq.addProperty("DS_SUBSCRIPTION_ENDDATE", subscriptionenddate);
    soapReq.addProperty("DS_SUBSCRIPTION_PERIODICITY", subscriptionperiodicity);
    soapReq.addProperty("DS_SUBSCRIPTION_AMOUNT", subscriptionamount);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);

    return callSoap(result, soapReq);
}

Subscription removal

Function: (remove_subscription)

This function will be used for removing a subscription from the account of the business.

The variables required for requesting the removal of a subscription are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the application of the business.

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_RESPONSE [0-1]{1} Result of operation. 0 or empty will be erroneous operation and 1 operation completed.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.

If the request generates an error of some kind (incorrect signature, user not found, etc) all fields will be delivered empty, except “DS_ERROR_ID” which will contain the error code.

If the transaction is correct, the service will return the field DS_RESPONSE the value of which will be 0 or empty in case of error and 1 in case of successful removal.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:remove_subscription xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        </mns:remove_subscription>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function removeSubscription(
    $idpayuser,
    $tokenpayuser
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->remove_subscription(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $signature,
            $ip
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse remove_subscription(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("remove_subscription");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", tokenuser);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);

    return callSoap(result, soapReq);
}

Execution of subscription registration of a existing user

Function: (create_subscription_token)

The registration of a subscription through this process will create a subscription for a user that was already registered in the system, without it being necessary in this case to send card data again.

The variables required for registering the subscription are:

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_SUBSCRIPTION_STARTDATE [YYYY-MM-DD] Mandatory. Subscription start date. If the value is empty the date is the same day of registration. IMPORTANT: Subscriptions are charged on the first run if this field has value it will be taken into account for future charges.
DS_SUBSCRIPTION_ENDDATE [YYYY-MM-DD] Mandatory. End date of the subscription. It may not be greater than the start date of the subscription + 5 years
DS_SUBSCRIPTION_ORDER [A-Za-z0-9]{1,20} Mandatory. First characters of the reference of the operation. IMPORTANT: Do not include the characters “[“ o “]”, they will be used to recognize the user of the business.
DS_SUBSCRIPTION_PERIODICITY [0-9]{3} Mandatory. Frequency of collection from the start date. The number expresses Days. It may not be greater than 365 days.
DS_SUBSCRIPTION_AMOUNT [0-9]{1,8} Mandatory. Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_SUBSCRIPTION_CURRENCY [EUR][USD][GBP][JPY] Mandatory. Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction (owner of the card)
DS_MERCHANT_SCORING [0-100] Optional. Valor de scoring de riesgo de la transacción. Entre 0 y 100.
DS_MERCHANT_DATA
JSON Optional. Client authentication information. The more information is provided in this field, the more likely the authorisation of the operation will be without requiring additional authentication. For this reason, it is recommended to send as much information as possible. See detail
DS_MERCHANT_SCA_EXCEPTION
[LWV|TRA|MIT|COR|MOT] Optional TYPE OF EXCEPTION TO THE SECURE PAYMENT. If not specified, PAYCOMET will try to assign it the most appropriate possible. See detail
DS_MERCHANT_TRX_TYPE [I|R|H|E|D|M|N|C]  Conditional Obligatory only if an MIT exception has been selected in the MERCHANT_SCA_EXCEPTION field. See detail
DS_USER_INTERACTION
[0|1] Optional. Indicates wether the business can interact with the customer

Example:

DS_SUBSCRIPTION_ORDER = Luis_3268314

The charge of the subscription to DS_IDUSER 32 on December 23, 2030 the system will return it as DS_SUBSCRIPTION_ORDER:

DS_SUBSCRIPTION_ORDER = Luis_3268314[23]20301223

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_IDUSER [0-9]{1,13} Unique identifier of the user registered in the system. It will come back empty in the case of error.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Token code associated with the DS_IDUSER.
DS_SUBSCRIPTION_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_SUBSCRIPTION_ORDER [A-Za-z0-9]{1,20} Original reference of the operation + [DS_IDUSER] + date of the transaction in format YYYYMMDD.
DS_SUBSCRIPTION_CURRENCY [EUR][USD][GBP][JPY] Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Authentication bank code of the transaction.
DS_MERCHANT_CARDCOUNTRY [0-9]{1,3} Country of the issuer of the card in ISO3 Code (ex.: 724 = Spain). May be left empty.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.
DS_CHALLENGE_URL [A-Za-z0-9]{250} If the parameter DS_USER_INTERACTION was set to 1, then it'll contain the URL where te business will have to redirect the customer

If the request generates an error of some kind (incorrect signature, incorrect amount, user not found, etc) all fields will be empty, except “DS_ERROR_ID” which will contain the error code.

If the execution of the first installment is successful the system will return all the fields except DS_ERROR_ID which will be left empty.

If the execution of the first installment has an error for several reasons (balance, validity of the card, etc...), the subscription will be canceled having to create a new subscription. In this case only DS_ERROR_ID will be returned with the specific error code.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:create_subscription_token xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_SUBSCRIPTION_STARTDATE type="xsd:string"> 2034-05-21 </DS_SUBSCRIPTION_STARTDATE>
        <DS_SUBSCRIPTION_ENDDATE type="xsd:string"> 2035-06-25 </DS_SUBSCRIPTION_ENDDATE>
        <DS_SUBSCRIPTION_ORDER type="xsd:string"> subscritionorder </DS_SUBSCRIPTION_ORDER>
        <DS_SUBSCRIPTION_PERIODICITY type="xsd:string"> 15 </DS_SUBSCRIPTION_PERIODICITY>
        <DS_SUBSCRIPTION_AMOUNT type="xsd:string"> 1234 </DS_SUBSCRIPTION_AMOUNT>
        <DS_SUBSCRIPTION_CURRENCY type="xsd:string"> EUR </DS_SUBSCRIPTION_CURRENCY>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        <DS_MERCHANT_SCORING type="xsd:integer"> 90 </DS_MERCHANT_SCORING>
        <DS_MERCHANT_DATA type="xsd:string"> Comerce Data </DS_MERCHANT_DATA>
        <DS_MERCHANT_SCA_EXCEPTION type="xsd:string"> MIT </DS_MERCHANT_SCA_EXCEPTION>
        <DS_MERCHANT_TRX_TYPE type="xsd:string"/> I </DS_MERCHANT_TRX_TYPE>
        <DS_ESCROW_TARGETS type="xsd:string"/> income recipient data </DS_ESCROW_TARGETS>
        <DS_USER_INTERACTION type="xsd:integer"/> 0 </DS_USER_INTERACTION>
        </mns:create_subscription_token>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function CreateSubscriptionToken(
    $idpayuser,
    $tokenpayuser,
    $startdate,
    $enddate,
    $transreference,
    $periodicity,
    $amount,
    $currency,
    $scoring = null,
    $merchant_data = null,
    $merchant_sca_exception = null,
    $merchant_trx_type = null,
    $escrow_targets = null,
    $user_interaction = null
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $amount
        . $currency
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->create_subscription_token(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $startdate,
            $enddate,
            $transreference,
            $periodicity,
            $amount,
            $currency,
            $signature,
            $ip,
            $scoring,
            $merchant_data,
            $merchant_sca_exception,
            $merchant_trx_type,
            $escrow_targets,
            $user_interaction
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse create_subscription_token(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];
    String subscriptionstartdate = args[6];
    String subscriptionenddate = args[7];
    String subscriptionorder = args[8];
    String subscriptionperiodicity = args[9];
    String subscriptionamount = args[10];
    String subscriptioncurrency = args[11];
    Integer merchantscoring = args[12];
    String merchant_data = args[13];
    String merchantdescriptor = args[14];
    String merchant_sca_exception = args[15];
    String merchant_trx_type = args[16];
    String escrow_targets = args[17];
    Integer user_interaction = args[18];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + subscriptionamount + subscriptioncurrency + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("create_subscription_token");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_SUBSCRIPTION_STARTDATE", subscriptionstartdate);
    soapReq.addProperty("DS_SUBSCRIPTION_ENDDATE", subscriptionenddate);
    soapReq.addProperty("DS_SUBSCRIPTION_ORDER", subscriptionorder);
    soapReq.addProperty("DS_SUBSCRIPTION_PERIODICITY", subscriptionperiodicity);
    soapReq.addProperty("DS_SUBSCRIPTION_AMOUNT", subscriptionamount);
    soapReq.addProperty("DS_SUBSCRIPTION_CURRENCY", subscriptioncurrency);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);
    soapReq.addProperty("DS_MERCHANT_SCORING", merchantscoring);
    soapReq.addProperty("DS_MERCHANT_DATA", merchant_data);
    soapReq.addProperty("DS_MERCHANT_MERCHANTDESCRIPTOR", merchantdescriptor);
    soapReq.addProperty("DS_MERCHANT_SCA_EXCEPTION", merchant_sca_exception);
    soapReq.addProperty("DS_MERCHANT_TRX_TYPE", merchant_trx_type);
    soapReq.addProperty("DS_ESCROW_TARGETS", escrow_targets);
    soapReq.addProperty("DS_USER_INTERACTION", user_interaction);

    return callSoap(result, soapReq);
}

Creating a user preauthorization in the system

Function: (create_preauthorization)

Once the user is registered in the system, preauthorization operations may be performed by sending their credentials and data of the operation.

The variables required for carrying out a preauthorization for a user registered in the system are the same as those described in section Execution of charges to a user in the system

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:create_preauthorization xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_AMOUNT type="xsd:string"> 1234 </DS_MERCHANT_AMOUNT>
        <DS_MERCHANT_ORDER type="xsd:string"> unique_operation_reference </DS_MERCHANT_ORDER>
        <DS_MERCHANT_CURRENCY type="xsd:string"> EUR </DS_MERCHANT_CURRENCY>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        <DS_MERCHANT_PRODUCTDESCRIPTION type="xsd:string"> Product description </DS_MERCHANT_PRODUCTDESCRIPTION>
        <DS_MERCHANT_OWNER type="xsd:string"> Card Owner  </DS_MERCHANT_OWNER>
        <DS_MERCHANT_SCORING type="xsd:integer"> 90 </DS_MERCHANT_SCORING>
        <DS_MERCHANT_DATA type="xsd:string"> Comerce Data </DS_MERCHANT_DATA>
        <DS_MERCHANT_MERCHANTDESCRIPTOR type="xsd:string"> Commerce descriptor </DS_MERCHANT_MERCHANTDESCRIPTOR>
        </mns:create_preauthorization>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function createPreauthorization(
    $idpayuser,
    $tokenpayuser,
    $amount,
    $transreference,
    $currency,
    $productdescription = false,
    $owner = false,
    $scoring = null,
    $merchant_data = null,
    $merchant_description = null
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $amount
        . $transreference
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->create_preauthorization(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $amount,
            $transreference,
            $currency,
            $signature,
            $ip,
            $productdescription,
            $owner,
            $scoring,
            $merchant_data,
            $merchant_description
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse create_preauthorization(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];
    String merchantamount = args[6];
    String transferenceid = args[7];
    String merchantcurrency = args[8];
    String merchantproductdescription = args[9];
    String merchantowner = args[10];
    String merchantscoring = args[11];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + terminal + merchantamount + transferenceid + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("create_preauthorization");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", tokenuser);
    soapReq.addProperty("DS_MERCHANT_AMOUNT", merchantamount);
    soapReq.addProperty("DS_MERCHANT_ORDER", transferenceid);
    soapReq.addProperty("DS_MERCHANT_CURRENCY", merchantcurrency);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);
    soapReq.addProperty("DS_MERCHANT_PRODUCTDESCRIPTION", merchantproductdescription);
    soapReq.addProperty("DS_MERCHANT_OWNER", merchantowner);
    soapReq.addProperty("DS_MERCHANT_SCORING", merchantscoring);

    return callSoap(result, soapReq);
}

Confirmation of a user preauthorization in the system

Function: (preauthorization_confirm)

Once a preauthorization operation has been performed and authorized, it can be confirmed to make the cash payment within 7 days; after that date, preauthorizations become invalid. The amount of the preauthorization confirmation can be less than, equal to or greater the original preauthorization, without exceeding 15% of the original preauthorization.

The variables required to confirm the preauthorization are:

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_IDUSER [0-9]{1,13} Mandatory. Unique identifier of the user registered in the system.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Mandatory. Token code associated with the DS_IDUSER.
DS_MERCHANT_AMOUNT [0-9]{1,8} Mandatory. Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Mandatory. Reference operation. Should be that identified the original preauthorization.
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction
DS_MERCHANT_MERCHANTDESCRIPTOR [A-Za-z0-9]{1,25} Optional. Allows the business to send a text up to 25 characters that will be printed on the customer invoice. Limited to simple characters, no accents or special characters.

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_MERCHANT_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Reference of the operation.
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY] Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Authorization bank code of the transaction (required to execute a return).
DS_MERCHANT_CARDCOUNTRY [0-9]{1,3} Country of the issuer of the card in ISO3 Code (ex.: 724 = Spain). May be left empty.
DS_RESPONSE [0-1]{1} Result of operation. 0 or empty will be erroneous operation and 1 operation completed.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.
Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:preauthorization_confirm xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_AMOUNT type="xsd:string"> 1234 </DS_MERCHANT_AMOUNT>
        <DS_MERCHANT_ORDER type="xsd:string"> unique_operation_reference </DS_MERCHANT_ORDER>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        <DS_MERCHANT_MERCHANTDESCRIPTOR type="xsd:string"> Commerce descriptor </DS_MERCHANT_MERCHANTDESCRIPTOR>
        </mns:preauthorization_confirm>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function preauthorizationConfirm(
    $idpayuser,
    $tokenpayuser,
    $amount,
    $transreference,
    $merchant_description = null
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $transreference
        . $amount
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->preauthorization_confirm(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $amount,
            $transreference,
            $signature,
            $ip,
            $merchant_description
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse preauthorization_confirm(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];
    String merchantamount = args[6];
    String merchantorder = args[7];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + this.terminal + merchantorder + merchantamount + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("preauthorization_confirm");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", dS_TOKEN_UtokenuserSER);
    soapReq.addProperty("DS_MERCHANT_AMOUNT", merchantamount);
    soapReq.addProperty("DS_MERCHANT_ORDER", merchantorder);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);

    return callSoap(result, soapReq);
}

Cancelation of a user preauthorization in the system

Function: (preauthorization_cancel)

Once a preauthorization has been performed, it can be canceled within 7 days.

The variables required to cancel the preauthorization and the response elements are the same as for the preauthorization confirmation.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:preauthorization_cancel xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_IDUSER type="xsd:string"> paycometuserid  </DS_IDUSER>
        <DS_TOKEN_USER type="xsd:string"> paycometusertoken  </DS_TOKEN_USER>
        <DS_MERCHANT_AMOUNT type="xsd:string"> 1234 </DS_MERCHANT_AMOUNT>
        <DS_MERCHANT_ORDER type="xsd:string"> unique_operation_reference </DS_MERCHANT_ORDER>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        </mns:preauthorization_cancel>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function preauthorizationCancel(
    $idpayuser,
    $tokenpayuser,
    $amount,
    $transreference
) {
    $signature = hash("sha512",
        $merchantCode
        . $idpayuser
        . $tokenpayuser
        . $terminal
        . $transreference
        . $amount
        . $password
    );
    $ip = $_SERVER["REMOTE_ADDR"];
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->preauthorization_cancel(
            $merchantCode,
            $terminal,
            $idpayuser,
            $tokenpayuser,
            $amount,
            $transreference,
            $signature,
            $ip
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse preauthorization_cancel(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String iduser = args[4];
    String tokenuser = args[5];
    String merchantamount = args[6];
    String merchantorder = args[7];

    merchantsignature = makeSHA1hash(merchantcode + iduser + tokenuser + this.terminal + merchantorder + merchantamount + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("preauthorization_cancel");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_IDUSER", iduser);
    soapReq.addProperty("DS_TOKEN_USER", tokenuser);
    soapReq.addProperty("DS_MERCHANT_AMOUNT", merchantamount);
    soapReq.addProperty("DS_MERCHANT_ORDER", merchantorder);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);

    return callSoap(result, soapReq);
}

Execution of a user registration in the system by Token

Function: (add_user_token)

This method allows a user to register based on a token previously obtained through the solution BankStore JET-IFRAME

The variables required for registering a user are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_MERCHANT_JETTOKEN [a-z0-9]{64} Mandatory. Token obtenido mediante javascript.
DS_MERCHANT_JETID [a-z0-9]{32} Mandatory. Identifier for JET encryption.
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_ORIGINAL_IP A.B.C.D Mandatory. IP Address of the customer that initiated the payment transaction

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_IDUSER [0-9]{1,13} Unique identifier of the user registered in the system. It will come back empty in the case of error.
DS_TOKEN_USER [A-Za-z0-9]{1,20} Token code associated with the DS_IDUSER.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.
Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:add_user_token xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_MERCHANT_JETTOKEN type="xsd:string"> paycomettoken  </DS_MERCHANT_JETTOKEN>
        <DS_MERCHANT_JETID type="xsd:string"> yourjetid  </DS_MERCHANT_JETID>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_ORIGINAL_IP type="xsd:string"> 1.2.3.4  </DS_ORIGINAL_IP>
        </mns:add_user_token>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function addUserToken($jettoken)
{
    $signature 
        = hash("sha512",
             $merchantCode
            .$jettoken
            .$jetid
            .$terminal
            .$password
    );
    $ip	= $_SERVER["REMOTE_ADDR"];
    try{
        $clientSOAP = new SoapClient($endpoint);
        $ans 
            = $clientSOAP
                ->add_user_token(
                    $merchantCode,
                    $terminal,
                    $jettoken,
                    $jetid,
                    $signature,
                    $ip
                );
    } catch(SoapFault $e){
        var_dump($e);
        return false;
    }
    var_dump($ans);
    return $ans;
}

public ServiceResponse add_user_token(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String ipaddr = args[3];
    String jetid = args[4];
    String jettoken = args[5];

    merchantsignature = makeSHA1hash(merchantcode + jettoken + jetid + terminal + password);

    ServiceResponse result = new ServiceResponse();
    
    SoapObject soapReq = new SoapObject("add_user_token");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_MERCHANT_JETTOKEN", jettoken);
    soapReq.addProperty("DS_MERCHANT_JETID", jetid);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_ORIGINAL_IP", ipaddr);

    return callSoap(result, soapReq);
}

Execution of Charges to a user by Reference

Function: execute_purchase_rtoken

This method allows you to run a charge based on a token previously obtained by Payment by Reference

The variables required for registering a user are (in this order):

Element Content Description
DS_MERCHANT_MERCHANTCODE [A-Za-z0-9]{1,8} Mandatory. Customer code
DS_MERCHANT_TERMINAL [0-9]{1,5} Mandatory. Terminal number
DS_MERCHANT_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,70} Mandatory. Reference of the operation. Must be unique on every valid transaction.
DS_MERCHANT_IDENTIFIER [a-z0-9]{40} Identifier obtained by previous Payment by Reference
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY] Currency of the transaction. See more information in CURRENCY
DS_MERCHANT_MERCHANTSIGNATURE [a-zA-Z0-9] Mandatory. See signature calculation next.
DS_MERCHANT_MERCHANTDESCRIPTOR [A-Za-z0-9]{1,25} Optional. Allows the business to send a text up to 25 characters that will be printed on the customer invoice. Limited to simple characters, no accents or special characters.

The response of the service to the request is performed by the return of an array formatted in XML with the various elements described in the following table:

Element Content Description
DS_MERCHANT_AMOUNT [0-9]{1,8} Amount of the operation in integer format. 1.00 EURO = 100, 4.50 EUROS = 450...
DS_MERCHANT_ORDER [A-Za-z0-9]{1,12} Reference of the operation.
DS_MERCHANT_CURRENCY [EUR][USD][GBP][JPY] Currency of the transaction. See more information in MONEDAS
DS_MERCHANT_AUTHCODE [a-zA-Z0-9]{1,40} Authorization bank code of the transaction (required to execute a return).
DS_MERCHANT_CARDCOUNTRY [0-9]{1,3} Country of the issuer of the card in ISO3 Code (ex.: 724 = Spain). May be left empty.
DS_RESPONSE [0-1]{1} Result of operation. 0 or empty will be erroneous operation and 1 operation completed.
DS_ERROR_ID [0-9]{1,5} In the case of error, the error code generated will be here. If there is no error it will be 0 or empty. The error codes are specified in the document ERROR CODES.

If the request generates an error of some kind (incorrect signature, user not found, etc) all fields will be delivered empty, except “DS_ERROR_ID” which will contain the error code.

If the transaction is correct, the service will return the field DS_RESPONSE the value of which will be 0 or empty in case of error and 1 in case of successful removal.

Different languages usage:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:Paytpv_bankStoreGateway" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
        <mns:execute_purchase_rtoken xmlns:mns="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <DS_MERCHANT_MERCHANTCODE type="xsd:string"> yourmerchantcode  </DS_MERCHANT_MERCHANTCODE>
        <DS_MERCHANT_TERMINAL type="xsd:string"> yourterminal  </DS_MERCHANT_TERMINAL>
        <DS_MERCHANT_AMOUNT type="xsd:string"> 1234 </DS_MERCHANT_AMOUNT>
        <DS_MERCHANT_ORDER type="xsd:string"> unique_operation_reference </DS_MERCHANT_ORDER>
        <DS_MERCHANT_IDENTIFIER type="xsd:string"> merchantidentifier </DS_MERCHANT_IDENTIFIER>
        <DS_MERCHANT_CURRENCY type="xsd:string"> EUR </DS_MERCHANT_CURRENCY>
        <DS_MERCHANT_MERCHANTSIGNATURE type="xsd:string"> yourgeneratedsignature12345  </DS_MERCHANT_MERCHANTSIGNATURE>
        <DS_MERCHANT_PRODUCTDESCRIPTION type="xsd:string"> Product description </DS_MERCHANT_PRODUCTDESCRIPTION>
        <DS_MERCHANT_MERCHANTDESCRIPTOR type="xsd:string"> Commerce descriptor </DS_MERCHANT_MERCHANTDESCRIPTOR>
        </mns:execute_purchase_rtoken>    
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

function executePurchaseRToken(
    $amount,
    $transreference,
    $rtoken,
    $currency,
    $productdescription = false,
    $merchant_description = null
) {
    $signature = hash("sha512",
        $terminal
        . $amount
        . $transreference
        . $rtoken
        . $password
    );
    try {
        $clientSOAP = new SoapClient($endpoint);
        $ans = $clientSOAP->execute_purchase_rtoken(
            $merchantCode,
            $terminal,
            $amount,
            $transreference,
            $rtoken,
            $currency,
            $signature,
            $productdescription,
            $merchant_description
        );
    } catch (SoapFault $e) {
        var_dump($e);
    }
    var_dump($ans);
}

public ServiceResponse execute_purchase_rtoken(String[] args) {

    String merchantcode = args[0];
    String terminal = args[1];
    String password = args[2];
    String merchantamount = args[3];
    String merchantorder = args[4];
    String merchantidentifier = args[5];
    String merchantcurrency = args[6];
    String merchantaproductdescription = args[7];

    merchantsignature = makeSHA1hash(merchantcode + this.terminal + merchantamount + merchantorder + merchantidentifier + password);

    ServiceResponse result = new ServiceResponse();

    SoapObject soapReq = new SoapObject("execute_purchase_rtoken");
    soapReq.addProperty("DS_MERCHANT_MERCHANTCODE", merchantcode);
    soapReq.addProperty("DS_MERCHANT_TERMINAL", terminal);
    soapReq.addProperty("DS_MERCHANT_AMOUNT", merchantamount);
    soapReq.addProperty("DS_MERCHANT_ORDER", merchantorder);
    soapReq.addProperty("DS_MERCHANT_IDENTIFIER", merchantidentifier);
    soapReq.addProperty("DS_MERCHANT_CURRENCY", merchantcurrency);
    soapReq.addProperty("DS_MERCHANT_MERCHANTSIGNATURE", merchantsignature);
    soapReq.addProperty("DS_MERCHANT_PRODUCTDESCRIPTION", merchantaproductdescription);

    return callSoap(result, soapReq);
}

APPENDIX I – Business signature calculation

The signature will be calculated on the server of the business and shall cover the main parameters of the request to verify the integrity of the data over the Internet and the browser of the buyer.

The SHA512 encryption algorithm will be used for this purpose, which enables us to encrypt a text string. These types of one direction algorithms prevent the initial parameter from being obtained using the result.

The signature will be calculated differently depending on the function used to verify the integrity of data sent to the platform.

To facilitate the generation of the signature in languages without the necessary tools for the calculation of SHA512 algorithms, a series of libraries have been included. These files can be downloaded from the section Support->Documentation of the customer control panel.

Some of these libraries have been created by persons or entities not related to PAYCOMET. Consult the content of each file for further information.

Signature calculation depending on the function used

The signature that the business will send to the gateway will be calculated in the following manner (in pseudocode):

Function: (add_user)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_MERCHANT_PAN + DS_MERCHANT_CVV2 + DS_MERCHANT_TERMINAL + PASSWORD)

 

Function: (info_user)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + PASSWORD)

 

Function: (remove_user)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + PASSWORD)

 

Function: (execute_purchase)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + DS_MERCHANT_AMOUNT + DS_MERCHANT_ORDER + PASSWORD)

 

Function: (execute_purchase_dcc)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + DS_MERCHANT_AMOUNT + DS_MERCHANT_ORDER + PASSWORD)

 

Function: (confirm_purchase_dcc)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_MERCHANT_TERMINAL + DS_MERCHANT_ORDER + DS_MERCHANT_DCC_CURRENCY + DS_MERCHANT_DCC_SESSION + PASSWORD)

 

Function: (execute_refund)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + DS_MERCHANT_AUTHCODE + DS_MERCHANT_ORDER + PASSWORD)

 

Function: (create_subscription)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_MERCHANT_PAN + DS_MERCHANT_CVV2 + DS_MERCHANT_TERMINAL + DS_SUBSCRIPTION_AMOUNT + DS_SUBSCRIPTION_CURRENCY + PASSWORD)

 

Function: (edit_subscription)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + DS_SUBSCRIPTION_AMOUNT + PASSWORD)

 

Function: (remove_subscription)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + PASSWORD)

 

Function: (create_subscription_token)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + DS_SUBSCRIPTION_AMOUNT + DS_SUBSCRIPTION_CURRENCY + PASSWORD)

 

Function: (create_preauthorization)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + DS_MERCHANT_AMOUNT + DS_MERCHANT_ORDER + PASSWORD)

 

Function: (preauthorization_confirm)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + DS_MERCHANT_ORDER + DS_MERCHANT_AMOUNT + PASSWORD)

 

Function: (preauthorization_cancel)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_IDUSER + DS_TOKEN_USER + DS_MERCHANT_TERMINAL + DS_MERCHANT_ORDER + DS_MERCHANT_AMOUNT + PASSWORD)

 

Function: (add_user_token)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_MERCHANT_JETTOKEN + DS_MERCHANT_JETID + DS_MERCHANT_TERMINAL + PASSWORD)

 

Function: (execute_purchase_rtoken)

SHA512(DS_MERCHANT_MERCHANTCODE + DS_MERCHANT_TERMINAL + DS_MERCHANT_AMOUNT + DS_MERCHANT_ORDER + DS_MERCHANT_IDENTIFIER + PASSWORD)

 

APPENDIX II – OPERATION TYPES

The operation types that will be notified are detailed in the following table:

ID Operation
1 Authorization
2 Refund
3 Preauthorization
4 Preauthorization cancellation
6 Preauthorization confirmation
9 Subscription
13 Defered Preauthorization Registration
14 Defered Preauthorization Confirmation
16 Defered Preauthorization Cancellation
106 Chargeback
107 Bankstore user registration