This is the method that initiates a Nonsecure/3D payment transaction. For 3D transactions, the HTML code content returned by the method is displayed on the screen, and the redirection is performed. The credit card verification process begins.
Control Scenarios
You can find the test scenarios we expect to be conducted during the integration process here.
Order Amount Calculation Including Commission
Commission Rate: The installment's commission rate selected from the TP_Ozel_Oran_SK_Liste method
Islem_Tutar: The amount of your order
Total_Amount = Islem_Tutar + ((Islem_Tutar x Commission Rate) / 100)
is calculated as shown.
If the Sonuc parameter is greater than "0", print the UCD_HTML content on the screen to initiate the 3D Secure Payment process. Follow the steps below to complete the payment transaction from the credit card.
For NonSecure Transactions (Important)
If Sonuc > 0, UCD_HTML is checked for equality to 'NONSECURE'. If they match, the transaction ends. Islem_ID value represents the Receipt Number.
For a successful NonSecure transaction, Sonuc > 0, Islem_ID > 0, and UCD_HTML='NONSECURE' must all be true. Otherwise, the transaction fails.
If the NONSECURE transaction fails, Sonuc_Str returns the error message from the bank.
If Sonuc > 0 and UCD_HTML <> 'NONSECURE', it is handled like a 3D transaction.
TP_Islem_Odeme_OnProv_WMD Hash Formula
Dim Transaction_Security_Str$ = CLIENT_CODE & GUID & Islem_Tutar & Toplam_Tutar & Siparis_ID & Hata_URL & Basarili_URL
Dim Transaction_Hash$ = SHA2B64(Transaction_Security_Str)
Parameter | Required | Type | Length | Description |
---|---|---|---|---|
G | Yes | Object | - | ST_WS_Guvenlik Object |
GUID | Yes | String | 36 | Merchant Key |
KK_Sahibi | Yes | String | 100 | Credit Card Holder |
KK_No | Yes | String | 16 | Credit Card Number |
KK_SK_Ay | Yes | String | 2 | 2-digit Expiry Month |
KK_SK_Yil | Yes | String | 4 | 4-digit Expiry Year |
KK_CVC | Yes | String | 3 | CVC Code |
KK_Sahibi_GSM | Yes | String | 10 | Credit Card Holder GSM No, without leading 0 (5xxxxxxxxx) |
Hata_URL | Yes | String | 256 | URL of the page to redirect if payment fails |
Basarili_URL | Yes | String | 256 | URL of the page to redirect if payment is successful |
Siparis_ID | Yes | String | 50 | Unique ID specific to the order. If you have sent this value before, the system assigns a new Siparis_ID. The system returns this Siparis_ID upon completion of the transaction. |
Siparis_Aciklama | No | String | 250 | Description of the order |
Taksit | Yes | Integer | 2 | Number of Installments selected. Send 1 for single installment. |
Islem_Tutar | Yes | String | - | Order Amount, (only in comma-separated cents format 1000.50) |
Toplam_Tutar | Yes | String | - | Total Order Amount Including Commission, (only in comma-separated cents format 1000.50) |
Islem_Hash | Yes | String | - | Transaction Hash Value |
Islem_Guvenlik_Tip | Yes | String | - | NS (NonSecure) or 3D |
Islem_ID | No | String | - | Unique ID apart from Order ID optional. |
IPAdr | Yes | String | 50 | IP Address |
Ref_URL | No | String | 256 | URL of the page where the payment is made |
Data1 | No | String | 250 | Extra Field 1 |
Data2 | No | String | 250 | Extra Field 2 |
Data3 | No | String | 250 | Extra Field 3 |
Data4 | No | String | 250 | Extra Field 4 |
Data5 | No | String | 250 | Extra Field 5 |
Parameter | Type | Length | Description |
---|---|---|---|
Islem_ID | Long | - | SID Value |
Islem_GUID | String | 36 | Transaction GUID value |
UCD_HTML | String | - | 3D HTML code |
UCD_MD | String | - | 3D MD value |
Sonuc | Integer | - | Transaction result |
Sonuc_Str | String | - | Transaction result description |
Bank_Trans_ID | String | - | Bank Transaction ID value |
Bank_AuthCode | String | - | Bank Auth Code value |
Bank_HostMsg | String | - | Bank HostMsg value |
Banka_Sonuc_Kod | Integer | - | Bank's returned code |
Bank_Extra | String | - | Bank Extra value |
Result Parameters Example: For operations with NS
Sonuç Parametreleri Örnek: 3D li işlemler için
When you print UCD_HTML content on the screen, the Bank's 3D screen will be displayed. After 3D verification, the following parameters will be posted to your Basarili_URL or Hata_URL pages.
Parameter | Type | Length | Description |
---|---|---|---|
md | String | - | Value of MD to be sent to UCD_MD parameter in TP_WMD_Pay method |
mdStatus | Integer | 1 | 3D Verification Result. 1: Successful - Other cases indicate 3D verification failure. |
orderId | String | - | Order_ID value sent to TP_Islem_Odeme_OnProv_WMD method |
transactionAmount | String | - | Transaction amount sent to TP_Islem_Odeme_OnProv_WMD method |
islemGUID | String | 36 | Transaction GUID value returned from TP_Islem_Odeme_OnProv_WMD method |
islemHash | String | - | Transaction Hash value returned from TP_Islem_Odeme_OnProv_WMD method |
Hash Control
To perform parameter verification, the following procedure must be followed.
Parameters that make up the hash value
islemGUID + md + mdStatus + orderId + GUID (key should go as Lower)
The hash value is encoded as based64. (SHA1)
Example Code
Dim _sha As SHA1 = New SHA1CryptoServiceProvider()
Dim _bytes() As Byte = System.Text.Encoding.UTF8.GetBytes(islemGUID + md + mdStatus + orderId + GUID (Key of
the Merchant))
Dim _hashingbytes() As Byte = _sha.ComputeHash(_bytes)
Dim _hash As String = Convert.ToBase64String(_hashingbytes)
The hash value you created and the posted islemHash value must be the same.
mdStatus Values
1 = Verified Transaction (Full 3D)
2, 3, 4 = Card not enrolled (Half 3D)
5, 6, 7, 8 = No valid authentication or system error
0 = Verification Failed
If mdStatus is 1, 2, 3, or 4, you can send a request to the TP_WMD_Pay method to complete the
payment.
If mdStatus is 0, 5, 6, 7, or 8, 3D verification has failed. Do not send a request to the TP_WMD_Pay
method.
This method is used to complete the pre-authorization from the verified cards.
Parameters to send:
Parameter | Required | Type | Length | Description |
---|---|---|---|---|
G | Yes | Object | - | ST_WS_Guvenlik Object |
GUID | Yes | String | 36 | Merchant's Key |
UCD_MD | Yes | String | - | Bank's 3D MD value |
Islem_GUID | Yes | String | 36 | Transaction GUID value |
Siparis_ID | Yes | String | - | Order ID value |
Result Parameters:
Parameter | Type | Length | Description |
---|---|---|---|
Sonuc | Integer | - | Transaction result |
Sonuc_Ack | String | 36 | Transaction result description |
Dekont_ID | String | 36 | Transaction receipt ID |
Siparis_ID | String | - | Order ID value |
UCD_MD | String | - | Bank's 3D MD Value |
Bank_Trans_ID | String | - | Bank Transaction ID value |
Bank_AuthCode | String | - | Bank Auth Code value |
Bank_HostMsg | String | - | Bank HostMsg value |
Bank_Extra | String | - | Bank Extra value |
Bank_Sonuc_Kod | Integer | - | Bank result code value |
Bank_HostRefNum | String | - | Bank RRN value |
If Sonuc > 0 and Dekont_ID > 0, the transaction is successful. Otherwise the transaction fails.
You can switch to the Pre-authorization - Closing method.
You can find the test scenarios we expect during the integration here.
Converts the pre-authorization transaction into a sale.
Parameter | Required | Type | Length | Description |
---|---|---|---|---|
G | Yes | Object | - | ST_WS_Security Object |
GUID | Yes | String | 36 | Member Merchant Key |
Prov_ID | No | String | - | Provision ID (Optional, can be left blank) |
Prov_Tutar | Yes | String | - | Amount to Close (only in comma-separated cents format 1000.50) |
Siparis_ID | Yes | String | - | Order ID Value |
Parameter | Type | Length | Description |
---|---|---|---|
Sonuc | Integer | - | Transaction result |
Sonuc_Str | String | - | Transaction result description |
Prov_ID | String | - | Provision ID |
Dekont_ID | Long | - | Transaction receipt ID |
Banka_Sonuc_Kod | Integer | - | Bank's returned code |
This method is used to cancel a provision for which no sales transaction has been made.
Parameter | Required | Type | Length | Description |
---|---|---|---|---|
G | Yes | Object | - | ST_WS_Guvenlik Object |
GUID | Yes | String | 36 | Member Merchant Key |
Prov_ID | No | String | - | Provision ID (Optional, can be empty) |
Siparis_ID | Yes | String | - | Order ID Value |
Parameter | Type | Length | Description |
---|---|---|---|
Sonuc | Integer | - | Transaction result |
Sonuc_Str | String | - | Transaction result description |
Banka_Sonuc_Kod | Integer | - | Code returned from the bank |