Skip to content

Commit

Permalink
Merge pull request #84 from phgoncalves/master
Browse files Browse the repository at this point in the history
Payments search fix
  • Loading branch information
Pedro Gonçalves authored Aug 23, 2019
2 parents 9df65a6 + 53191c7 commit 57a2f1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/main/java/com/mercadopago/core/MPBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,16 @@ private static <T extends MPBase> String parsePath(String path, HashMap<String,
.append("?access_token=")
.append(accessToken);


if (!mapParams.isEmpty()) {
for ( Map.Entry<String, String> entry : mapParams.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();

processedPath.append("&" + key + "=" + value);
}
}

if (!MPCoreUtils.validateUrl(processedPath.toString())) {
throw new MPException("Processed URL not valid: " + processedPath.toString());
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/mercadopago/resources/Payment.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public enum PaymentTypeId {
atm,
credit_card,
debit_card,
prepaid_card
prepaid_card,
digital_currency
}
private String token = null;
private Card card = null;
Expand Down

0 comments on commit 57a2f1b

Please sign in to comment.