-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from culqi/featrue/solution-bugs
Feature/solution bugs
- Loading branch information
Showing
5 changed files
with
49 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import java.util.Calendar; | ||
import java.util.GregorianCalendar; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
|
@@ -11,8 +9,6 @@ public class JsonData { | |
|
||
protected Map<String, Object> jsonToken() throws Exception { | ||
Map<String, Object> token = new HashMap<String, Object>(); | ||
Calendar date = new GregorianCalendar(); | ||
int year = date.get(Calendar.YEAR); | ||
token.put("card_number", "4111111111111111"); | ||
token.put("cvv", "123"); | ||
token.put("email", "[email protected]"); | ||
|
@@ -31,7 +27,7 @@ protected Map<String, Object> jsonUpdateToken() throws Exception { | |
|
||
protected Map<String, Object> jsonListTokens() throws Exception { | ||
Map<String, Object> token = new HashMap<String, Object>(); | ||
token.put("bin", "411111"); | ||
token.put("card_brand", "Visa"); | ||
return token; | ||
} | ||
|
||
|
@@ -115,12 +111,12 @@ protected Map<String, Object> jsonListCharges() throws Exception { | |
|
||
protected Map<String, Object> jsonPlanFilter() throws Exception { | ||
Map<String, Object> plan = new HashMap<String, Object>(); | ||
plan.put("status", 1); | ||
//plan.put("status", 1); | ||
plan.put("limit", 1); | ||
plan.put("before","pln_live_qnJOtJiuGT88dAa5"); | ||
plan.put("after", "pln_live_qnJOtJiuGT88dAa5"); | ||
plan.put("min_amount", 300); | ||
plan.put("max_amount", 500000); | ||
//plan.put("before","pln_live_qnJOtJiuGT88dAa5"); | ||
//plan.put("after", "pln_live_qnJOtJiuGT88dAa5"); | ||
//plan.put("min_amount", 300); | ||
//plan.put("max_amount", 500000); | ||
//plan.put("creation_date_from", "1712673354"); | ||
//plan.put("creation_date_to", "1712673354"); | ||
return plan; | ||
|
@@ -164,11 +160,16 @@ protected Map<String, Object> jsonUpdatePlan() throws Exception { | |
} | ||
|
||
protected Map<String, Object> jsonCustomer() throws Exception { | ||
int maxLength = 25; | ||
String baseEmail = "[email protected]"; | ||
int randomPartLength = maxLength - baseEmail.length(); | ||
String randomString = new Util().ramdonStringWithLengthMax(randomPartLength); | ||
String email = "tst" + randomString + "@culqi.com"; | ||
Map<String, Object> customer = new HashMap<String, Object>(); | ||
customer.put("address", "Av Lima 123"); | ||
customer.put("address_city", "Lima"); | ||
customer.put("country_code", "PE"); | ||
customer.put("email", "tst" + new Util().ramdonString() + "@culqi.com"); | ||
customer.put("email", email); // Debe ser maximo 25 caracteres | ||
customer.put("first_name", "Test"); | ||
customer.put("last_name", "Cuqli"); | ||
customer.put("phone_number", "99004356"); | ||
|