Skip to content

Commit a439f15

Browse files
test
2 parents 596dd30 + ff25e26 commit a439f15

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

java/src/main/java/com/cybersource/ws/client/Utility.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,17 @@ public static String mapToString(Map src, boolean mask, int type) {
440440
* @return Document Request from filename read as document
441441
*/
442442
public static Document readRequest(Properties props, String filename) {
443+
return readRequest(props,filename, null);
444+
}
445+
446+
/**
447+
* Read the request xml file
448+
* @param props Properties object to lookup properties in
449+
* @param filename Filename of file containing XML request
450+
* @param merchantId merchantId
451+
* @return Document Request from filename read as document
452+
*/
453+
public static Document readRequest(Properties props, String filename, String merchantId) {
443454
Document doc = null;
444455

445456
try {
@@ -453,7 +464,7 @@ public static Document readRequest(Properties props, String filename) {
453464
StringBuilder sb = new StringBuilder(xmlString);
454465
sb.replace(
455466
pos, pos + 7,
456-
XMLClient.getEffectiveNamespaceURI(props, null));
467+
XMLClient.getEffectiveNamespaceURI(props, merchantId));
457468
xmlBytes = sb.toString().getBytes("UTF-8");
458469
}
459470

@@ -478,7 +489,7 @@ public static Document readRequest(Properties props, String filename) {
478489

479490
return (doc);
480491
}
481-
492+
482493
/**
483494
* Creates an Element object in the CyberSource namespace.
484495
*

0 commit comments

Comments
 (0)