Skip to content

Commit e31e000

Browse files
Ensure that custom field variable names have a '_' where the display name had spaces (#85)
1 parent 53ed9a2 commit e31e000

File tree

1 file changed

+1
-1
lines changed
  • paystack/src/main/java/co/paystack/android/model

1 file changed

+1
-1
lines changed

paystack/src/main/java/co/paystack/android/model/Charge.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public Charge putCustomField(String displayName, String value) throws JSONExcept
167167
JSONObject customObj = new JSONObject();
168168
customObj.put("value", value);
169169
customObj.put("display_name", displayName);
170-
customObj.put("variable_name", displayName.toLowerCase(Locale.getDefault()).replaceAll("[^a-z0-9 ]","_"));
170+
customObj.put("variable_name", displayName.toLowerCase(Locale.getDefault()).replaceAll("[^a-z0-9]","_"));
171171
this.custom_fields.put(customObj);
172172
this.hasMeta = true;
173173
return this;

0 commit comments

Comments
 (0)