Skip to content

Commit

Permalink
Minor changes to StripeRest
Browse files Browse the repository at this point in the history
  • Loading branch information
fayderflorez committed Oct 4, 2017
1 parent a5bb034 commit 145cbd2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public class Contribution {

private int amount;
private String token;
private String email;

public int getAmount() {
return amount;
Expand All @@ -17,15 +16,10 @@ public String getToken() {
return token;
}

public String getEmail() {
return email;
}

@Override
public String toString() {
return "Contribution{" +
"amount=" + amount +
", email='" + email + '\'' +
'}';
}
}
4 changes: 2 additions & 2 deletions src/main/java/eu/fayder/restcountries/v2/rest/StripeRest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ public class StripeRest {

@POST
public Object contribute(Contribution contribution) {
LOG.debug("Contribution: " + contribution);

if (contribution == null || TextUtils.isBlank(contribution.getToken())) {
return getResponse(Response.Status.BAD_REQUEST);
}

LOG.debug("Contribute: " + contribution.toString());

Stripe.apiKey = "";
Map<String, Object> params = new HashMap<>();
params.put("amount", contribution.getAmount());
Expand Down

0 comments on commit 145cbd2

Please sign in to comment.