forked from andreneto7/java-sample-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpushfundsPOST.java
More file actions
54 lines (52 loc) · 1.85 KB
/
Copy pathpushfundsPOST.java
File metadata and controls
54 lines (52 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import java.util.*;
import java.io.IOException;
import com.visa.developer.sample.fundstransfer.*;
import com.visa.developer.sample.fundstransfer.api.*;
public class pushfundsPOST {
public static int main(String[] args) throws IOException, ApiException {
HashMap<String,String> auth = new Auth().getAuthCreds();
FundstransferApi api = new FundstransferApi(auth);
String payload = "{"
+" \"transactionIdentifier\": \"381228649430015\","
+" \"transactionCurrencyCode\": \"USD\","
+" \"systemsTraceAuditNumber\": \"451018\","
+" \"sourceOfFundsCode\": \"05\","
+" \"senderStateCode\": \"CA\","
+" \"senderReference\": \"\","
+" \"senderName\": \"Mohammed Qasim\","
+" \"senderCountryCode\": \"124\","
+" \"senderCity\": \"Foster City\","
+" \"senderAddress\": \"901 Metro Center Blvd\","
+" \"senderAccountNumber\": \"4957030420210454\","
+" \"retrievalReferenceNumber\": \"412770451018\","
+" \"recipientPrimaryAccountNumber\": \"4957030420210462\","
+" \"recipientName\": \"rohan\","
+" \"pointOfServiceData\": {"
+" \"posConditionCode\": \"00\","
+" \"panEntryMode\": \"90\","
+" \"motoECIIndicator\": \"0\""
+" },"
+" \"merchantCategoryCode\": \"6012\","
+" \"localTransactionDateTime\": \"2017-10-13T08:18:50\","
+" \"cardAcceptor\": {"
+" \"terminalId\": \"TID-9999\","
+" \"name\": \"Visa Inc. USA-Foster City\","
+" \"idCode\": \"CA-IDCode-77765\","
+" \"address\": {"
+" \"zipCode\": \"94404\","
+" \"state\": \"CA\","
+" \"county\": \"San Mateo\","
+" \"country\": \"USA\""
+" }"
+" },"
+" \"businessApplicationId\": \"AA\","
+" \"amount\": \"124.05\","
+" \"acquiringBin\": \"408999\","
+" \"acquirerCountryCode\": \"840\""
+"}";
String xClientTransactionId = "21042016";
String response = api.pushfunds(xClientTransactionId, payload);
System.out.print(response);
return 0;
}
}