11package net .authorize .sample ;
22
33import java .io .BufferedReader ;
4+ import java .io .IOException ;
45import java .io .InputStreamReader ;
56
67import net .authorize .sample .VisaCheckout .*;
1718 */
1819public class SampleCode {
1920
20- public static void main ( String [] args )
21+ public static void main ( String [] args )
2122 {
2223
23- if (args .length == 0 )
24- {
25- SelectMethod ();
26- }
27- else if (args .length == 1 )
28- {
29- RunMethod (args [0 ]);
30- return ;
31- }
32- else
33- {
34- ShowUsage ();
35- }
24+ if (args .length == 0 )
25+ {
26+ SelectMethod ();
27+ }
28+ else if (args .length == 1 )
29+ {
30+ RunMethod (args [0 ]);
31+ return ;
32+ }
33+ else
34+ {
35+ ShowUsage ();
36+ }
3637
37- System .out .println ("" );
38- System .out .print ("Press <Return> to finish ..." );
39- BufferedReader br = new BufferedReader (new InputStreamReader (System .in ));
40- try {
41- int i = Integer .parseInt (br .readLine ());
42- }catch (Exception ex ) {
43- }
38+ System .out .println ("" );
39+ System .out .print ("Press <Return> to finish ..." );
40+ BufferedReader br = new BufferedReader (new InputStreamReader (System .in ));
41+ try {
42+ int i = Integer .parseInt (br .readLine ());
43+ }catch (Exception ex ) {
44+ }
4445
4546 }
4647
@@ -96,7 +97,6 @@ private static void ShowMethods()
9697 System .out .println (" CancelSubscription" );
9798 System .out .println (" UpdateSubscription" );
9899 System .out .println (" GetListOfSubscriptions" );
99- System .out .println (" GetAccountUpdaterJobDetails" );
100100 System .out .println (" GetBatchStatistics" );
101101 System .out .println (" GetSettledBatchList" );
102102 System .out .println (" GetTransactionList" );
@@ -138,16 +138,15 @@ private static void RunMethod(String methodName)
138138 {
139139 // These are default transaction keys.
140140 // You can create your own keys in seconds by signing up for a sandbox account here: https://developer.authorize.net/sandbox/
141- String apiLoginId = "mbld_api_%63ty4Rq" ;
142-
143- String transactionKey = "123abc" ;
141+ String apiLoginId = "5KP3u95bQpv" ;
142+ String transactionKey = "346HZ32z3fP4hTG2" ;
144143 //Update the payedId with which you want to run the sample code
145144 String payerId = "6ZSCSYG33VP8Q" ;
146145 //Update the transactionId with which you want to run the sample code
147146 String transactionId = "123456" ;
148147
149- String customerProfileId = "40204235 " ;
150- String customerPaymentProfileId = "1000041617 " ;
148+ String customerProfileId = "37905546 " ;
149+ String customerPaymentProfileId = "34461178 " ;
151150 String customerAddressId = "1871959249" ;
152151
153152 String emailId =
"[email protected] " ;
@@ -164,9 +163,7 @@ private static void RunMethod(String methodName)
164163// System.setProperty("https.proxyPort", "portNumber");
165164// System.setProperty("https.proxyUserName", "exampleUsername");
166165// System.setProperty("https.proxyPassword", "examplePassword");
167-
168-
169-
166+
170167 switch (methodName ) {
171168 case "DecryptVisaCheckoutData" :
172169 DecryptVisaCheckoutData .run (apiLoginId , transactionKey );
@@ -345,14 +342,9 @@ private static void RunMethod(String methodName)
345342 case "GetAnAcceptPaymentPage" :
346343 GetAnAcceptPaymentPage .run (apiLoginId , transactionKey , amount );
347344 break ;
348- case "GetAccountUpdaterJobDetails" :
349- GetAccountUpdaterJobDetails .run (apiLoginId , transactionKey );
350- break ;
351-
352345 default :
353346 ShowUsage ();
354347 break ;
355348 }
356-
357349 }
358350}
0 commit comments