A kind of offline electronic payment implementation method that online consumption system is synchronized based on stored value card
Technical field
It is specifically a kind of to make the present invention relates to the offline electronic payment implementation method that online consumption system is synchronized based on stored value card
With payment implementation method of the online consumption system POS terminal of IC card and its derivative medium when offline.Belong to all-purpose card application skill
Art field.
Background technology
It is wide using various types of consumption management systems of IC card and its derivative medium as identification and storage medium
General use.
According to the storage location and deduction mode of the balance of funding, the consumption management system can generally be divided into online consumption
System and off-line consumption system.
In off-line consumption system, card stored value card stores the balance of funding, and transaction off line is carried out, tested without obtaining server
Card and
It authorizes, operation of withholing directly is carried out to stored value card.Therefore off-line consumption system has advantages below:1), to net
The dependence of network is relatively low, and server shutdown and network failure do not interfere with being normally carried out for transaction;2), due to being handed under off line
Easily, server authentication is not needed to, under the premise of equivalent network quality, server hardware ability and not influencing swipes the card speed, is
System can carry more equipment.But off-line consumption system has the disadvantage that:1), proceed to flow of withholing and set when card operation
Fixed separation, if occurring card and equipment miscommunication at this time, holder does not comply with the situation that regulation continues to swipe the card, due to setting
Whether succeed for not knowing that card is withholdd, generate an ash record at this time;Only when the next record transaction record of card is transferred to
It just can confirm that whether above-mentioned ash record has withholdd during server, lead to processing not in time, flow is excessively complicated;2), due to note
It records data to upload not in time, upload sequence may be inconsistent with trading order, causes checkout not in time, and reconciliation is difficult, easily goes out
Existing server the balance of funding and the situations such as card electronic purse balance amount is inconsistent, Ka Ku is not inconsistent;3), to mend card processing complicated, mend card
When there may be the record not uploaded, can generate card stored value card the balance of funding mistake under such situation.An existing part is de-
Machine consumption system is simply subject to card wallet balances, has thus evaded the complexity of system, but due to not having accounting processing
Mechanism, therefore easily generate fund loophole.
In online consumption system, fund account remaining sum stores in the server, merchandise it is online carry out, equipment is by transaction data
Transmission
To server, verification is completed by server, is authorized and operation of withholing.Its advantage is:1), online withhold, be not present
The delay phenomenon uploaded is recorded, data are promptly and accurately;2), hair fastener, mend and the operations such as block, deposit, reporting the loss and come into force in time;3), checkout
In time, accurately;4), ashless record;5), card do not store the balance of funding, therefore the phenomenon that be not inconsistent there is no Ka Ku.But disappear online
Charge system has the following disadvantages:1), it is higher to the dependency degree of network and server, network or server failure can greatly reduce
System responsiveness energy cannot carry out arm's length dealing under serious conditions;2), equipment concurrent capability dependent on network and server
Ability, when number of devices increase, may influence speed of swiping the card;3), the undesirable system of design Storage, over time, number
The response performance of bankcard consumption can be seriously affected according to the growth of amount;4), in order to solve a large amount of personnel's concentrating payments(For example dining room disappears
Take payment)The problem of, when network or server failure, the general consumption pattern using equipment book keeping operation treats system as supplement
After recovery, offline record, which is transferred to server, to carry out fund account and withholds operation.POS terminal is due to needing synchronous and management to hold
People's fund account remaining sum causes design complicated, and due to each equipment independent operating, can not avoid malicious overdraft behavior.
In order to solve the problems, such as online consumption off-line trading, some systems are used as supplement by the way of offline small wallet, but
Offline small wallet increases the complexity of system, and it also requires solution online consumption system and the load of offline small wallet are asked
Topic.
Invention content
The offline of online consumption system is synchronized based on stored value card the technical problem to be solved by the invention is to provide a kind of
Implementation method is paid, consumption overdraw during solving the problems, such as that online consumption system POS terminal is offline.
Technical scheme is as follows:
A kind of offline electronic payment implementation method that online consumption system is synchronized based on stored value card, it is characterised in that including following
Step:
When POS terminal is online, Card Reader sheet data, if the offline record that card presence is not uploaded onto the server, 1), will
The offline record do not uploaded onto the server is uploaded onto the server first to be handled, and 2), the offline record strip number of card reset, and
Server the balance of funding is synchronized to card stored value card, 3), operation of withholing to server application, 4), server withhold success,
5), the balance of funding that server returns is synchronized to card stored value card, complete payment;If there is no do not upload to service with card
The offline record of device, then be directly entered the 3rd)Step;
When POS terminal is offline, include the following steps:Card Reader sheet data, if card electronic purse balance amount is sufficient, and card
The offline record number do not uploaded onto the server is not up to maximum value, then a), withhold to stored value card, write card and remember offline
Record, and update offline record strip number, b), POS terminal generation off-line trading record, c), complete payment;If card does not upload to clothes
The offline record number of business device reaches the maximum item number of setting or card electronic purse balance amount deficiency, then does not allow to pay.
When POS terminal is online, if equipment has the off-line trading record not uploaded, equipment is actively offline by what is do not uploaded
Transaction record, which is uploaded onto the server, to be handled;It uploads and is recorded in backstage progress offline, to avoid current process of exchange is influenced.
When POS terminal is online, if equipment has the off-line trading record not uploaded, in server end or equipment end, lead to
Manual or timing mode is crossed, in batches by off-line trading data transmission to server.
The stored value card quantity is one or more.
The positive effect of the present invention is:During online consumption system online transaction, sync server fund account remaining sum arrives
Card stored value card, card stored value card are only used for preventing fund from overdrawing during off-line trading, the money possessed without representing holder
Gold, therefore there is no the grey record problems of off-line consumption system.The present invention had both solved online consumption system server or network
Under fault condition, off-line trading is solved offline using the equipment malicious overdraft that generates of book keeping operation mode and the complexity of design
Transaction is using the huge problem of system of systems caused by stiver packet mode.
Compared with off-line consumption system, online consumption system using the present invention significantly reduces answering for system design
Miscellaneous degree improves the stability of system, reduces exploitation testing cost and operation maintenance cost.
Specific embodiment
It further illustrates the present invention With reference to embodiment.
In order to application it is this based on stored value card synchronize online consumption system offline electronic payment implementation method, card storage with
Lower data:
Stored value card;Offline record strip number and offline record storage region.During hair fastener, by electronic purse balance amount and offline note
Record item number is initialized as 0.
When POS terminal is online, online transaction is carried out, is included the following steps:Card Reader sheet data does not upload if card exists
To the offline record of server, then offline record is uploaded onto the server first and handled, then by the offline record strip of card
Number is reset, while server the balance of funding is synchronized to card stored value card, is withholdd operation to server application, and server is withholdd
Success,
The balance of funding that server returns is synchronized to card stored value card, is merchandised successfully.If there is no do not upload card
It to the offline record of server, then directly withholds operation to server application, server is withholdd success, the money that server is returned
Golden remaining sum is synchronized to card stored value card, merchandises successfully.
When POS terminal is offline, off-line trading is carried out, is included the following steps:Card Reader sheet data, if not uploading onto the server
Offline record number reach maximum item number or card electronic purse balance amount is insufficient, then do not allow to continue to consume.If card electronic money
Packet remaining sum is sufficient, and the offline record number that card is not uploaded onto the server is not up to maximum value, then card stored value card is carried out
It withholds, and writes card off-line trading record, update card off-line trading record number, POS terminal generation off-line trading record, transaction
Success.
When POS terminal is online, if equipment exist do not upload off-line trading record, equipment should actively will not upload from
Line transaction record, which is uploaded onto the server, to be handled.Current process of exchange should not be influenced by uploading offline record, need to backstage into
Row.
It, can also be in server end or equipment if equipment has the off-line trading record not uploaded when POS terminal is online
End, by manual or timing mode, in batches by off-line trading data transmission to server.
Stored value card quantity can be one or more.