Author Topic: Introducing Refid (Reference ID) in otomax transaction  (Read 5261 times)

blackneck6666

  • Moderator
  • Jr. Member
  • **
  • Posts: 158
    • Optimugen
Introducing Refid (Reference ID) in otomax transaction
« on: December 26, 2013, 12:19:59 PM »
The original article is from this : http://www.otomax-software.com/id/668/meningkatkan-keamanan-transaksi-dengan-refid/

As server owner now with otomax for you rely on instant messenging likes yahoo,xmpp,gtalk or even facebook. An unstable internet connection might cause you loss. The loss occur from unpredicted messege, it might come from slow or delayed messege. this picture below describe the problem



In picture Client is the server buy from other server, supplier is the seller provide the stocks/Goods for sell.

On t3, because of transaction status is pending, or haven't have the reply from supplier. the otomax operator/employe maybe "resend" the messege hoping that the supplier will give a reply on corresponded transaction. But in mean time (t4) the supplier decided to that the transaction failed. and your transaction in otomax automatically make it failed and send to client server customer the transaction failed already. But on t3, client haven't have the reply yet from supplier, also supplier havent received the resend messege from client

On t6, client just got the failed messege from supplier and otomax change the status of transaction from "pending" become "failed", and status of 'failed"" had informed to reseller/customer  doing transaction. And that transaction assumed "Finished" without further changing status of transaction

But on t5, supplier just accepted the "resend" command from client, if the transaction before is in "succesful" status, normally supplier will block the command. Because the transaction before is failed the supplier will proceed the transaction as new transaction

Of course this will be a problem for client if the transaction had "finished" with "failed" status, morever the information send to supplier accepted and the credit on supplier is deducted from that transaction


REFID Solution


On t5, supplier will find transaction with refid326, what ever the transaction coming, supplier will not reproceed the trnsaction, but inform the status of transaction with refid326

Application

REFID only available with otomax 3.3 or newer
There few step to applicate the REFID in otomax
1. In supplier, transaction format add it with [refid], sample of request format
Code: [Select]
[kodeproduk].[tujuan].[pin]R#[refid]



2. In supplier, adding information [refid] in every transaction status reply
Code: [Select]
R#[refid] [namaproduk] [kodeproduk].[tujuan] GAGAL. [keterangan]

3. In client, insert parameter[trxid] on parsing, the parameter [trxid] will be assume as [refid] on supplier side. Parameter [counter] will not needed anymore, because it is accomodate with parameter [trxid]/[refid] so the example sending transaction 
Code: [Select]
T[nominal].[tujuan].[pin]R#[trxid]
4. On client side, capturing parameter [refid] sent by supplier as [trxid] in cliend side. for capturing [refid] from client side, For capturing [refid] from supplier can also using regex : R#(?<trxid>\d+)\D we don't have to capture the number and qty of the transaction anymore because all have represented by trxid on client side transaction



Conclusion.
The implementation of REFID is to avoid loss because of slow or unstable internet connection. With TRXID as REFID we can recapture the REFID as TRXID. So the accuration of the transaction is risen to higher level. And the wrong reply for wrong transaction can be avoided.

Implementation Of REFID is only available on otomax 3.3 and above
« Last Edit: December 26, 2013, 10:54:27 PM by blackneck6666 »
Hariyanto
+8618825217195
gtalk : blackneck6666
Shenzhen, Guangzhou, Hongkong.
http://www.aliexpress.com/store/feedback-score/215038.html

blackneck6666

  • Moderator
  • Jr. Member
  • **
  • Posts: 158
    • Optimugen
Re: Introducing Refid (Reference ID) in otomax transaction
« Reply #1 on: December 26, 2013, 12:32:58 PM »
if some one have implemented feel free to post your own pics in english version. this pics is translated from indonesia version
Hariyanto
+8618825217195
gtalk : blackneck6666
Shenzhen, Guangzhou, Hongkong.
http://www.aliexpress.com/store/feedback-score/215038.html