Advertisement
MGafi

Untitled

Apr 22nd, 2019
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. output on;
  2.  
  3. // create wallet applet
  4. 0x80 0xB8 0x00 0x00 0x14 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x08 0x0 0x0 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
  5.  
  6.  
  7. /////////////////////////////////////////////////////////////////////
  8. // Initialize Wallet
  9. /////////////////////////////////////////////////////////////////////
  10.  
  11. //Select Wallet
  12. 0x00 0xA4 0x04 0x00 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x7F;
  13. // 90 00 = SW_NO_ERROR
  14.  
  15.  
  16. //Verify user pin
  17. 0x80 0x20 0x00 0x00 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
  18. //90 00 = SW_NO_ERROR
  19.  
  20. //Credit $9000 to the account
  21. 0x80 0x30 0x00 0x00 0x02 0x23 0x28 0x7F;
  22. //0x9000 = SW_NO_ERROR
  23.  
  24. //Get wallet cash balance
  25. 0x80 0x50 0x01 0x00 0x00 0x02;
  26. //0x00 0x00 0x23 0x28 0x90 0x00 = Balance = 9000 and SW_NO_ERROR
  27.  
  28. //Get wallet points balance
  29. 0x80 0x50 0x02 0x00 0x00 0x02;
  30. //0x00 0x00 0x02 0x00 0x00 0x00 = Balance = 0 and SW_NO_ERROR
  31.  
  32.  
  33. //Debit $5600 from the account
  34. 0x80 0x40 0x01 0x00 0x05 0x15 0xe0 0x04 0x04 0x13 0x7F;
  35. //0x9000 = SW_NO_ERROR
  36.  
  37. //Get wallet cash balance
  38. 0x80 0x50 0x01 0x00 0x00 0x02;
  39. //0x00 0x00 0x0d 0x48 0x90 0x00 = Balance = 3400 and SW_NO_ERROR
  40.  
  41. //Get wallet points balance
  42. 0x80 0x50 0x02 0x00 0x00 0x02;
  43. //0x00 0x00 0x02 0x01 0x18 0x00 = Balance = 280 and SW_NO_ERROR
  44.  
  45. //Debit $600 from the account
  46. 0x80 0x40 0x01 0x00 0x05 0x02 0x58 0x0d 0x04 0x13 0x7F;
  47. //0x9000 = SW_NO_ERROR
  48.  
  49. //Get wallet cash balance
  50. 0x80 0x50 0x01 0x00 0x00 0x02;
  51. //0x00 0x00 0x0a 0x0f0 0x90 0x00 = Balance = 2800 and SW_NO_ERROR
  52.  
  53. //Get wallet points balance
  54. 0x80 0x50 0x02 0x00 0x00 0x02;
  55. //0x00 0x00 0x02 0x01 0x2c 0x00 = Balance = 300 and SW_NO_ERROR
  56.  
  57. //Debit 400 points from the account during promotion
  58. 0x80 0x40 0x02 0x00 0x05 0x01 0x90 0x14 0x04 0x13 0x7F;
  59. //0x9000 = SW_NO_ERROR
  60.  
  61. //Get wallet cash balance
  62. 0x80 0x50 0x01 0x00 0x00 0x02;
  63. //0x00 0x00 0x0a 0x0f0 0x90 0x00 = Balance = 2800 and SW_NO_ERROR
  64.  
  65. //Get wallet points balance
  66. 0x80 0x50 0x02 0x00 0x00 0x02;
  67. //0x00 0x00 0x02 0x00 0x64 0x00 = Balance = 100 and SW_NO_ERROR
  68.  
  69. //Credit $4000 to the account
  70. 0x80 0x30 0x00 0x00 0x02 0x0f 0xa0 0x7F;
  71. //0x9000 = SW_NO_ERROR
  72.  
  73.  
  74. //Debit $4200 from the account
  75. 0x80 0x40 0x01 0x00 0x05 0x10 0x68 0x15 0x04 0x13 0x7F;
  76. //0x9000 = SW_NO_ERROR
  77.  
  78. //Get wallet cash balance
  79. 0x80 0x50 0x01 0x00 0x00 0x02;
  80. //0x00 0x00 0x0a 0x028 0x90 0x00 = Balance = 2600 and SW_NO_ERROR
  81.  
  82. //Get wallet points balance
  83. 0x80 0x50 0x02 0x00 0x00 0x02;
  84. //0x00 0x00 0x02 0x01 0x2c 0x00 = Balance = 300 and SW_NO_ERROR
  85.  
  86. //Debit 400 points from the account after more than a month
  87. 0x80 0x40 0x02 0x00 0x05 0x01 0x90 0x14 0x06 0x13 0x7F;
  88. //0x6a85 = SW_NEGATIVE_BALANCE
  89.  
  90. //Debit 100 points from the account after more than a month
  91. 0x80 0x40 0x02 0x00 0x05 0x00 0x64 0x14 0x06 0x13 0x7F;
  92. //0x9000 = SW_NO_ERROR
  93.  
  94. //Get wallet cash balance
  95. 0x80 0x50 0x01 0x00 0x00 0x02;
  96. //0x00 0x00 0x0a 0x028 0x90 0x00 = Balance = 2600 and SW_NO_ERROR
  97.  
  98. //Get wallet points balance
  99. 0x80 0x50 0x02 0x00 0x00 0x02;
  100. //0x00 0x00 0x02 0x00 0xc8 0x00 = Balance = 200 and SW_NO_ERROR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement