Payment terminal TIMAPI.DLL

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Payment terminal TIMAPI.DLL

Post by edk »

Some improvements:
- querying the terminal for guides, checking if the terminal has all the guides required by the application, logging into the terminal with common terminal and application guides.
- defining one hTIM_CFG variable for all TIM-API parameters
- purchase transactions support
- credit transactions support
- cancel transactions support
- receipt request support
- cash advance support (terminal must support "Advanced Retail" guide)
- support for reversal transactions (purchase and credit)
- balance support
- code reorganization
- error handling
Attachments
TIMAPI.zip
(49.48 KiB) Downloaded 606 times
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Payment terminal TIMAPI.DLL

Post by edk »

Hi George. I am wondering about the need to configure the integration ID. Does this mean that you need a unique identifier from Worldline to be able to operate Worldline payment terminals? Without it, the terminal will not work at all? You provide any internet addresses: test and production, so you have to go through some process of validation of the correctness of communication between POS and EFT? Where this address is configured? Worldline certifies the software that works with their terminals?
Georg_BA
Posts: 108
Joined: Fri Apr 07, 2017 5:31 pm
DBs Used: DBF

Re: Payment terminal TIMAPI.DLL

Post by Georg_BA »

Hi Edward

First of all, I would like to thank you, without your help I would not have moved on.

I didn't hear from you for a few days, I was waiting for support.
After 3 days of setup, initialization and "wise advice", the payment terminal went through ACTIVATE
A problem arose again, I could not go through the authorization of the payment card. I received a set of different types of payment cards for testing, the system rejected them all.
Answer from support
"There are some issues with our test host environment and none of transactions are accepted.
We are checking it from time to time and hope that it will run soon. "

And so I wait...

To your questions:
The integration ID is only used in communication, it is not entered directly into the payment terminal
It is the data in your section

Code: Select all

FUNCTION TIM_Login ( nSequenceNumber, cPosID )
Local cSIXml := '<?xml version="1.0" encoding="UTF-8"?>' + ;
                '<sixml:Request xmlns:sixml="http://www.worldline.com/" ' + ;
                'FunctionGroup="Admin" ' + ;
                'Function="Login" ' + ;
                'SequenceNumber="'  + AllTrim( Str( nSequenceNumber ) ) + '">' + ;
                '<sixml:PosId>' + cPosID + '</sixml:PosId>' + ;
                '<sixml:IntegratorId>'+id_timinteg+'</sixml:IntegratorId>' +;
it is a 32 digit code in five blocks

Of the IP addresses, only the first one is entered into the terminal during initialization
1 Software download 153.46.253.140:8953 HTTP tserv.ep2.telekurs.com

I assume that the terminal will take care of the rest, only the specified ip addresses must be available

Yes, I have to go through the validation process.
After the implementation of the integration, I have to fill out the document, the verification phase will begin.

Tomorrow (today, it's already morning) I'll try your new features.
The way I look at them, I will need them all ;)

I will let you know the experience with the real terminal, I'm just afraid that I won't move further until I pass the verification of the credit card.

Georg
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Payment terminal TIMAPI.DLL

Post by edk »

I started converting the code into a class. What other features do you think will be needed?
Georg_BA
Posts: 108
Joined: Fri Apr 07, 2017 5:31 pm
DBs Used: DBF

Re: Payment terminal TIMAPI.DLL

Post by Georg_BA »

Hi Edward

Thank you for your efforts.

I'm sure I'll forget something important :)

Payment card data

ta_card_data_get_acc @112
ta_card_data_get_account_type @113
ta_card_data_get_aid @114
ta_card_data_get_asrpd @115
ta_card_data_get_brand_name @116
ta_card_data_get_card_country_code @117
ta_card_data_get_card_expiry_date @118
ta_card_data_get_card_number @119
ta_card_data_get_card_number_enc @120
ta_card_data_get_card_number_enc_key_index @121
ta_card_data_get_card_number_printable @122
ta_card_data_get_card_number_printable_cardholder @123
ta_card_data_get_card_product_type @124
ta_card_data_get_card_ref @125
ta_card_data_get_card_track_datas @126
ta_card_data_get_card_type @127
ta_card_data_get_cardholder @128
ta_card_data_get_emv_par @129
ta_card_data_get_language @130
ta_card_data_get_loyalty_information @131
ta_card_data_get_pos_entry_mode @132
ta_card_data_get_processing_disposition @133
ta_card_data_get_tender_name @134
ta_card_data_get_terminal_country_code @135
ta_card_data_get_token_pan @136
ta_card_data_get_token_pan_type @137
ta_card_data_get_uid @138
ta_card_product_type_e2s @139
ta_card_reader_e2s @140
ta_card_reader_status_e2s @141
ta_card_track_data_get_data @142
ta_card_track_data_get_track_number @143

these are functions from timapi.def

some data I don't even know what they are for

Card verification should already work, but I'll get to that on Saturday.
I will test it using AdvancedEcr.exe and your new functions and let you know what values are actually returned. These should be sufficient for records.

The return value would be an array.

Creation of the log file for the transaction

By trasaction I mean one case from Connect to Disconnect
Parameters - filename with path, append mode
Someone may want to save the log on a daily basis and then need append.
I personally prefer individual files, name -'document number'+'.tim'

Print transaction confirmation

Payment terminals are supplied in two versions
-with a printer
-without a printer

I have a terminal without printers at my disposal. My application must ensure printing on the cash register printer.
In Slovakia, it's similar to Poland, we have mandatory fiscal printers, so I print it on it after completing the cashier's receipt.

I don't know how it will turn out if I send the transaction to a payment terminal with a printer, whether it will automatically print it.
The return would be an array and individual rows.

I hope that we will reach a successful end.
It should help everyone who creates applications for stores.



Regards, George
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Payment terminal TIMAPI.DLL

Post by edk »

The information you have indicated to be obtained can now be read from the hash table of card information. When asking about features, I meant other types of payments, e.g. mobile payments using a phone and a code and/or NFC. BLIK mobile payments are very popular in Poland. I don't know how they could be implemented using the TIM API. Could you ask WorldLine Support whether and how to make such a BLIK payment?
Georg_BA
Posts: 108
Joined: Fri Apr 07, 2017 5:31 pm
DBs Used: DBF

Re: Payment terminal TIMAPI.DLL

Post by Georg_BA »

Hi Edward

Thank you for the clarification.
Of course I will ask. I am sending the given questions to Wordline.

Georg
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Payment terminal TIMAPI.DLL

Post by edk »

I am uploading the TIMAPI class with an example of use.
I also added new features.
TIMAPI-Class.7z
(49.15 KiB) Downloaded 705 times
I am not attaching the description yet (there is no time to develop it) but I have included comments in the code. I think they will be helpful.
TIMAPI.png
TIMAPI.png (284.75 KiB) Viewed 57151 times
TIMAPI2.png
TIMAPI2.png (239.53 KiB) Viewed 57151 times
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Payment terminal TIMAPI.DLL

Post by serge_girard »

Great job !
There's nothing you can do that can't be done...
Georg_BA
Posts: 108
Joined: Fri Apr 07, 2017 5:31 pm
DBs Used: DBF

Re: Payment terminal TIMAPI.DLL

Post by Georg_BA »

Hello Edward

Thanks for the great work.

During testing, a problem arises with the TIM_CardInfo method

Code: Select all

METHOD TIM_CardInfo () CLASS TIMAPI
Local oCardData := ::hTIM_CFG [ "oXML" ]:documentElement:selectNodes( "//sixml:CardData" ):item(0):attributes
After attaching or inserting a payment card into the reader, it will display an error

HMG Errorlog File

------------------------------------
Date:08/28/23 Time: 01:05:06
Error BASE/1004 No exported method: ATTRIBUTES
Called from ATTRIBUTES(0)
Called from TIMAPI:TIM_CARDINFO(1940)
Called from TIMAPI:TIM_RECVALL(1434)
Called from TIMAPI:PURCHASE(369)
Called from PURCHASE(439)
Called from (b)MAIN(19)
Called from _DOCONTROLEVENTPROCEDURE(6056)
Called from EVENTS(1756)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717)
Called from MAIN(218)

------------------------------------

I am also attaching the LOG file that was created so far
your_filename.zip

I solved it so far by creating an empty method with the given name

Code: Select all

METHOD TIM_CardInfo1 () CLASS TIMAPI
Local oCardData := ::hTIM_CFG [ "oXML" ]:documentElement:selectNodes( "//sixml:CardData" ):item(0):attributes
Local oOneAttribute := nil
Local oLanguage := ::hTIM_CFG [ "oXML" ]:documentElement:selectNodes( "//sixml:CardData/sixml:Language" )

IF oCardData:length > 0
    ::hTIM_CFG [ "CardInfo" ] := { => }
    FOR EACH oOneAttribute IN oCardData
        ::hTIM_CFG [ "CardInfo" ] [ oOneAttribute:name ] := oOneAttribute:text
    NEXT
    IF oLanguage:length > 0
        ::hTIM_CFG [ "CardInfo" ] [ "Language" ] := oLanguage:item(0):text
    ENDIF
    
    IF HB_ISEVALITEM( ::hTIM_CFG [ "CardInfoEvent" ] )
        Eval( ::hTIM_CFG [ "CardInfoEvent" ], ::hTIM_CFG [ "CardInfo" ] )
    ENDIF
ENDIF
RETURN

METHOD TIM_CardInfo () CLASS TIMAPI

RETURN

The transaction then proceeded correctly.
I am attaching a screenshot.

Log file after confirming the transaction
your_filenameok.zip

I am also testing other functions.

"Configurate"
has the effect of switching the terminal language to English

I don't know if it would be possible to set the terminal language in the "Initialize" function.
Function in timapi.def
ta_terminal_get_supported_languages @554
ta_terminal_change_language_for_request @505


Best regards, Georg
Attachments
your_filenameok.zip
(2.73 KiB) Downloaded 580 times
TIMAPI_AFTER_READ_CARD.jpg
TIMAPI_AFTER_READ_CARD.jpg (185.36 KiB) Viewed 57051 times
your_filename.zip
(2.06 KiB) Downloaded 590 times
Post Reply