@@ -40,7 +40,7 @@ public JSONObject swap(SwapParams swapParams) {
4040 }
4141
4242
43- public JSONObject createVirtualAccount (MintParams mintParams ) {
43+ public JSONObject createVirtualAccount (CreateVirtualParams mintParams ) {
4444 JSONObject payload = new JSONObject ();
4545 payload .put ("provider" , mintParams .getProvider ());
4646 payload .put ("bank_code" , mintParams .getBankCode ());
@@ -57,8 +57,8 @@ public JSONObject withdraw(IWithdrawParams withdrawParams) {
5757 return ServiceController .makeCalls (WITHDRAW , secrets , payload );
5858 }
5959
60- public JSONArray verifyWithdrawalReference (String tnxRef ) {
61- return ServiceController .makeCalls (VERIFY_WITHDRAWAL +tnxRef , secrets );
60+ public JSONObject verifyWithdrawalReference (String tnxRef ) {
61+ return ServiceController .makeCallObject (VERIFY_WITHDRAWAL +tnxRef , secrets );
6262 }
6363
6464 public JSONObject redeemAssets (RedeemAssetParams redeemAssetParams ) {
@@ -77,9 +77,9 @@ public JSONObject updateExternalAccounts(UpdateExternalAccountParams updateExter
7777
7878 public static void main (String [] args ) {
7979 System .out .println ("----------------------BEGIN TEST-------------------------" );
80- Secrets secrets = new Secrets ("your-api-key " ,
81- "your-private-key " ,
82- "your-encryption-key " );
80+ Secrets secrets = new Secrets ("" ,
81+ "" ,
82+ "" );
8383
8484 CNGNManager cngnManager = new CNGNManager (secrets );
8585 System .out .println ("----------------------BALANCE-------------------------" );
@@ -103,7 +103,7 @@ public static void main(String[] args) {
103103
104104
105105 System .out .println ("----------------------CREATE VIRTUAL ACCOUNT-------------------------" );
106- MintParams mintParams = new MintParams (
106+ CreateVirtualParams mintParams = new CreateVirtualParams (
107107 "korapay" ,
108108 "123"
109109 );
@@ -121,27 +121,26 @@ public static void main(String[] args) {
121121
122122 System .out .println ("----------------------WITHDRAW-------------------------" );
123123 IWithdrawParams withdrawParams = new IWithdrawParams (
124- "1000" ,
125- "0x789... " ,
126- Network .BSC ,
127- true
124+ 100 ,
125+ "0x8867D4efC159Cc7abEd4f700b2475B67bD11d0c8 " ,
126+ Network .ATC ,
127+ false
128128 );
129129 System .out .println ("Withdraw : " + cngnManager .withdraw (withdrawParams ));
130130
131131 System .out .println ("----------------------VERIFY WITHDRAWAL REFERENCE-------------------------" );
132132
133- System .out .println ("Withdraw : " + cngnManager .verifyWithdrawalReference (
134- "123-456-789-789405 "
133+ System .out .println ("Verify Withdrawal Reference : " + cngnManager .verifyWithdrawalReference (
134+ "52038cb7-a6da-41d0-a9d1-d28f89e627a0 "
135135 ));
136136
137+
137138 System .out .println ("----------------------UPDATE EXTERNAL ACCOUNTS-------------------------" );
138- UpdateExternalAccountParams updateExternalAccountParams = new UpdateExternalAccountParams (
139- "Test Bank" ,
139+ UpdateExternalAccountParams updateExternalAccountParams = new UpdateExternalAccountParams ();
140+ updateExternalAccountParams .addWalletAddress ("bscAddress" , "0xB438ed3f95d5004067A24c21D7F028052f66BF77" );
141+ updateExternalAccountParams .updateBankDetails ( "Test Bank" ,
140142 "Example account" ,
141- "1234567890"
142- );
143- updateExternalAccountParams .addWalletAddress ("bscAddress" , "0x3d8e...." );
144- //add other address
143+ "1234567890" );
145144
146145 System .out .println ("Update External Accounts " + cngnManager .updateExternalAccounts (updateExternalAccountParams ));
147146
0 commit comments