Skip to content

Commit df9ca79

Browse files
committed
Merge pull request #23 from wepay/fix_rbit_response
Fix rbit response
2 parents 5c36a08 + a81df87 commit df9ca79

File tree

7 files changed

+1
-30
lines changed

7 files changed

+1
-30
lines changed

lib/wepay.jar

12 KB
Binary file not shown.

src/main/java/com/wepay/model/Account.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
import org.json.*;
77

8-
import com.google.gson.FieldNamingPolicy;
9-
import com.google.gson.Gson;
10-
import com.google.gson.GsonBuilder;
11-
import com.wepay.WePay;
128
import com.wepay.net.WePayResource;
139
import com.wepay.exception.WePayException;
1410
import com.wepay.model.data.*;
@@ -57,7 +53,6 @@ public static Account[] find(AccountFindData findData, String accessToken) throw
5753

5854
public static Account create(AccountData data, String accessToken) throws JSONException, IOException, WePayException {
5955
JSONObject params = new JSONObject();
60-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
6156
params.put("name", data.name);
6257
params.put("description", data.description);
6358
if (data.referenceId != null) params.put("reference_id", data.referenceId);
@@ -84,7 +79,6 @@ public static Account create(AccountData data, String accessToken) throws JSONEx
8479

8580
public void modify(AccountData data, String accessToken) throws JSONException, IOException, WePayException {
8681
JSONObject params = new JSONObject();
87-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
8882
params.put("account_id", this.accountId);
8983
if (data.name != null) params.put("name", data.name);
9084
if (data.description != null) params.put("description", data.description);

src/main/java/com/wepay/model/Checkout.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
import org.json.*;
77

8-
import com.google.gson.FieldNamingPolicy;
9-
import com.google.gson.Gson;
10-
import com.google.gson.GsonBuilder;
11-
import com.wepay.WePay;
128
import com.wepay.net.WePayResource;
139
import com.wepay.exception.WePayException;
1410
import com.wepay.model.data.*;
@@ -64,7 +60,6 @@ public static Checkout[] find(CheckoutFindData findData, String accessToken) thr
6460

6561
public static Checkout create(CheckoutData data, String accessToken) throws JSONException, IOException, WePayException {
6662
JSONObject params = new JSONObject();
67-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
6863
params.put("account_id", data.accountId);
6964
params.put("short_description", data.shortDescription);
7065
params.put("type", data.type);
@@ -124,7 +119,6 @@ public void modify(String newCallbackUri, String accessToken) throws JSONExcepti
124119

125120
public void modify(CheckoutData data, String accessToken) throws JSONException, IOException, WePayException {
126121
JSONObject params = new JSONObject();
127-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
128122
params.put("checkout_id", this.checkoutId);
129123
params.put("callback_uri", data.callbackUri);
130124

src/main/java/com/wepay/model/Preapproval.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
import org.json.*;
77

8-
import com.google.gson.FieldNamingPolicy;
9-
import com.google.gson.Gson;
10-
import com.google.gson.GsonBuilder;
11-
import com.wepay.WePay;
128
import com.wepay.net.WePayResource;
139
import com.wepay.exception.WePayException;
1410
import com.wepay.model.data.*;
@@ -68,7 +64,6 @@ public static Preapproval[] find(PreapprovalFindData findData, String accessToke
6864

6965
public static Preapproval create(PreapprovalData data, String accessToken) throws JSONException, IOException, WePayException {
7066
JSONObject params = new JSONObject();
71-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
7267
if (data.accountId != null) params.put("account_id", data.accountId);
7368
if (data.amount != null) params.put("amount", data.amount);
7469
params.put("short_description", data.shortDescription);
@@ -117,7 +112,6 @@ public void modify(String newCallbackUri, String accessToken) throws JSONExcepti
117112
}
118113
public void modify(PreapprovalData data, String accessToken) throws JSONException, IOException, WePayException {
119114
JSONObject params = new JSONObject();
120-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
121115
params.put("preapproval_id", this.preapprovalId);
122116
params.put("callback_uri", data.callbackUri);
123117

src/main/java/com/wepay/model/Subscription.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
import org.json.*;
77

8-
import com.google.gson.FieldNamingPolicy;
9-
import com.google.gson.Gson;
10-
import com.google.gson.GsonBuilder;
11-
import com.wepay.WePay;
128
import com.wepay.net.WePayResource;
139
import com.wepay.exception.WePayException;
1410
import com.wepay.model.data.*;
@@ -69,7 +65,6 @@ public static Subscription[] find(SubscriptionFindData findData, String accessTo
6965

7066
public static Subscription create(SubscriptionData data, String accessToken) throws JSONException, IOException, WePayException {
7167
JSONObject params = new JSONObject();
72-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
7368
params.put("subscription_plan_id", data.subscriptionPlanId);
7469
if (data.redirectUri != null) params.put("redirect_uri", data.redirectUri);
7570
if (data.callbackUri != null) params.put("callback_uri", data.callbackUri);
@@ -98,7 +93,6 @@ public static Subscription create(SubscriptionData data, String accessToken) thr
9893

9994
public void modify(SubscriptionData data, String accessToken) throws JSONException, IOException, WePayException {
10095
JSONObject params = new JSONObject();
101-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
10296
params.put("subscription_id", this.subscriptionId);
10397
if (data.subscriptionPlanId != null) params.put("subscription_plan_id", data.subscriptionPlanId);
10498
if (data.callbackUri != null) params.put("callback_uri", data.callbackUri);

src/main/java/com/wepay/model/User.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
import org.json.*;
66

7-
import com.google.gson.FieldNamingPolicy;
8-
import com.google.gson.Gson;
9-
import com.google.gson.GsonBuilder;
107
import com.wepay.WePay;
118
import com.wepay.net.WePayResource;
129
import com.wepay.exception.WePayException;
@@ -39,7 +36,6 @@ public void modify(String newCallbackUri, String accessToken) throws JSONExcepti
3936
}
4037
public void modify(UserData data, String accessToken) throws JSONException, IOException, WePayException {
4138
JSONObject params = new JSONObject();
42-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
4339
params.put("callback_uri", data.callbackUri);
4440

4541
if (data.rbits != null) {
@@ -62,7 +58,6 @@ public void modify(UserData data, String accessToken) throws JSONException, IOEx
6258

6359
public static User register(UserData data, String accessToken) throws JSONException, IOException, WePayException {
6460
JSONObject params = new JSONObject();
65-
Gson gson = new GsonBuilder().setPrettyPrinting().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
6661
params.put("client_id", WePay.clientId);
6762
params.put("client_secret", WePay.clientSecret);
6863
params.put("email", data.email);

src/main/java/com/wepay/net/WePayResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected static javax.net.ssl.HttpsURLConnection httpsConnect(String call, Stri
4848
connection.setRequestMethod("POST");
4949
connection.setRequestProperty("Content-Type", "application/json");
5050
connection.setRequestProperty("Api-Version", "2015-08-15");
51-
connection.setRequestProperty("User-Agent", "WePay Java SDK v3.0.0");
51+
connection.setRequestProperty("User-Agent", "WePay Java SDK v3.0.1");
5252
if (accessToken != null) {
5353
connection.setRequestProperty("Authorization", "Bearer " + accessToken);
5454
}

0 commit comments

Comments
 (0)