forked from andreneto7/java-sample-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultipullfundsPOST.java
More file actions
67 lines (65 loc) · 2.22 KB
/
Copy pathmultipullfundsPOST.java
File metadata and controls
67 lines (65 loc) · 2.22 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
55
56
57
58
59
60
61
62
63
64
65
66
67
import java.util.*;
import java.io.IOException;
import com.visa.developer.sample.fundstransfer.*;
import com.visa.developer.sample.fundstransfer.api.*;
public class multipullfundsPOST {
public static int main(String[] args) throws IOException, ApiException {
HashMap<String,String> auth = new Auth().getAuthCreds();
FundstransferApi api = new FundstransferApi(auth);
String payload = "{"
+" \"request\": ["
+" {"
+" \"systemsTraceAuditNumber\": \"101011\","
+" \"senderPrimaryAccountNumber\": \"4895140000066666\","
+" \"senderCurrencyCode\": \"USD\","
+" \"senderCardExpiryDate\": \"2020-12\","
+" \"retrievalReferenceNumber\": \"401010101011\","
+" \"localTransactionDateTime\": \"2017-10-13T08:18:50\","
+" \"cavv\": \"0700020718799100000002980179911000000000\","
+" \"cardAcceptor\": {"
+" \"terminalId\": \"1234\","
+" \"name\": \"Mr Smith\","
+" \"idCode\": \"5678\","
+" \"address\": {"
+" \"zipCode\": \"94454\","
+" \"state\": \"CA\","
+" \"county\": \"00\","
+" \"country\": \"USA\""
+" }"
+" },"
+" \"amount\": \"100.00\""
+" },"
+" {"
+" \"systemsTraceAuditNumber\": \"101011\","
+" \"senderPrimaryAccountNumber\": \"4895140000066666\","
+" \"senderCurrencyCode\": \"USD\","
+" \"senderCardExpiryDate\": \"2020-12\","
+" \"retrievalReferenceNumber\": \"401010101011\","
+" \"localTransactionDateTime\": \"2016-01-06T21:32:52\","
+" \"cavv\": \"0700020718799100000002980179911000000000\","
+" \"cardAcceptor\": {"
+" \"terminalId\": \"1234\","
+" \"name\": \"Mr Smith\","
+" \"idCode\": \"5678\","
+" \"address\": {"
+" \"zipCode\": \"94454\","
+" \"state\": \"CA\","
+" \"county\": \"00\","
+" \"country\": \"USA\""
+" }"
+" },"
+" \"amount\": \"100.00\""
+" }"
+" ],"
+" \"merchantCategoryCode\": \"6012\","
+" \"localTransactionDateTime\": \"2017-10-13T08:18:50\","
+" \"businessApplicationId\": \"AA\","
+" \"acquiringBin\": \"408999\","
+" \"acquirerCountryCode\": \"608\""
+"}";
String xClientTransactionId = "21042016";
String response = api.multipullfunds(xClientTransactionId, payload);
System.out.print(response);
return 0;
}
}