Integracja - instrukcja techniczna

Dostępne są trzy opcje integracji.

Opcja 1: Panel Akceptanta

Metoda 1 

https://docs.tpay.com/#!/Tpay/tpay_no_api

Polega na przekierowaniu płatnika na stronę https://secure.tpay.com wraz z parametrami wymaganymi do założenia transakcji, które muszą być przesłane metodami POST (polecana) lub GET.

Parametry do założenia transakcji:

ParameterInformationAccepted values
id

Numeric identifier assigned to the merchant during the registration.

Mandatory parameter!

Numeric, e.g. 1005
amount

Transaction amount with dot as decimal separator.

Mandatory parameter!

Numeric, e.g. 157.32 
description

Transaction description

Mandatory parameter!

 Any, up to 128 characters
crcAuxiliary parameter to identify the transaction on the merchant side. Any, up to 128 characters
md5sum

The checksum used to verify the parameters received from the merchant. When seller's verification code is not set, its value is assumed to be an empty string.

Mandatory parameter!

Alphanumeric, 32 characters
onlineAllow online payments only – disallows selection of channels, which at this time, cannot process the payment in real time.

0 – no

1 – yes

group

Bank group number selected by customer on seller's website.

See how to put bank choice on your site.

Numeric, e.g. 8
result_urlThe URL address to which the transaction result will be sent via POST method. Note: The Tpay system will use the URL provided in merchant panel or value of this parameter if you enable the overriding in merchant panel (notifications tab).Alphanumeric, up to 512 characters
result_emailTpay system will send notifications about transactions to this email. If not present, Tpay system will use the default email set in the merchant panel. You can pass multiple addresses by separating them with semicolon.Alphanumeric, up to 512 characters
merchant_descriptionDescription of the seller during the transaction. By default, the value set in the merchant panel is used.Alphanumeric, up to 64 characters
custom_descriptionOptional field used for card transactions made via Acquirer (Elavon / eService). The value of the field is passed to Acquirer (Elavon / eService) as "TEXT REF. TRANSACTIONS ".Acceptable characters are a-z, A-Z (without Polish signs), 0-9, and space. All other characters will be cleared. Max 32 characters
return_urlThe URL to which the client will be redirected after the correct transaction processing.Alphanumeric, up to 512 characters
return_error_urlThe URL to which the client will be redirected in case transaction error occurs. By default, the same as return_url.Alphanumeric, up to 512 characters
languageCustomer language PL, EN
email

Customer email

Mandatory parameter!

Alphanumeric, up to 64 characters
name

Customer name

Mandatory parameter!

Alphanumeric, up to 64 characters
address

Customer address

Mandatory parameter!

Alphanumeric, up to 64 characters
cityCustomer cityAlphanumeric, up to 32 characters
zipCustomer postal codeAlphanumeric, up to 10 characters
countryCustomer countryAlphanumeric, 2 or 3 characters (ISO 3166-1)
phone

Customer telephone number

Mandatory parameter!

Alphanumeric, up to 16 characters
accept_tosCustomer acceptance of tpay.com rules. 

0 - no

1 - yes

expiration_dateMaximum transaction payment dateDate formatted as: YYYY:MM:DD:HH:MM (for Warsaw time GMT+1)
timehashParameter protects expiration_date from unauthorized changesAlphanumeric, up to 32 characters 

Uwaga: md5sum jest wymagane w celu zapewnienia bezpieczeństwa przesyłanych danych. Jeśli suma md5 wysłana do tpay.com ma nieprawidłową wartość, pojawi się błąd „nieprawidłowe parametry”. 

Metoda 2

https://docs.tpay.com/#!/Tpay/tpay_links_builder 

  1. Zaloguj się do Panelu Akceptanta.
  2. Wybierz zakładkę “Utwórz link”, a następnie zdefiniuj, jakie parametry ma mieć płatność - podaj kwotę i wybierz metodę płatności (w tym przypadku będzie to “Kup teraz, zapłać później”).
  3. Kliknij ”Uwórz” i przekaż wynegerowany link klientowi, aby mógł dokonać płatności za pomocą Twisto. 

Opcja 2: API

Na stronie https://docs.tpay.com/#!/Tpay/tpay_groups dostępne są instrukcje na temat endpointów, które zwracają listę dostępnych metod płatności. Po włączeniu Twisto, endpointy zwrócą dodatkową pozycję odpowiedzialną za płatności odroczone. Będzie to groupId 167. Następnie to groupId może być używane tak jak każdy inny kanał płatności. 

Na przykład:

{
  "amount": 200.15,
  "description": "Transakcja testowa",
  "payer": {
    "email": "[email protected]",
    "name": "Jan Kowalski"
  },
  "pay": {
    "groupId": 167
  }
}

 

{
  "id": 1010,
  "amount": 13.99,
  "description": "Payment for order X",
  "crc": 3214,
  "md5sum": "696160c3ca4b2ffbf1801036769a931a",
  "group": 167,
  "result_url": "https://shop.tpay.com/shop-endpoint",
  "result_email": "[email protected]",
  "merchant_description": "the best fruit shop",
  "custom_description": "string",
  "return_url": "https://shop.tpay.com/success",
  "return_error_url": "https://shop.tpay.com/error",
  "language": "en",
  "email": "[email protected]",
  "name": "john doe",
  "address": "Sunny street 25/7",
  "city": "New York",
  "zip": "61-505",
  "country": "US",
  "phone": "123456789",
  "accept_tos": 1,
  "api_password": "p@$$w0rd#@!"
}

 

Opcja 3: wtyczki

Integracja “Direct”: nie musisz dokonywać żadnych aktualizacji. Twisto pojawi się na liście dostępnych metod płatności po włączeniu go w Panelu Akceptanta.

Integracja “on-site”: tzw. wyciągnięcie metody płatności Twisto jest uzależnione od tego, czy Twoja wtyczka ma taką funkcjonalność. Jeśli nie ma, to posiadanie tej funkcjonalności może wiązać się to z dodatkową pracą Twojego programisty.

Lista wspieranych wtyczek: wkrótce podamy