Skip to content

Commit 843f5dc

Browse files
committed
null check user token
1 parent d0bee9a commit 843f5dc

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

bootpay/src/main/java/kr/co/bootpay/BootpayWebView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ private String price() {
371371
}
372372

373373
private String easyPayUserToken() {
374+
if(request.getEasyPayUserToken() == null || "null".equals(request.getEasyPayUserToken())) return "";
374375
return String.format(Locale.KOREA, "user_token:'%s'", request.getEasyPayUserToken());
375376

376377
}
@@ -488,7 +489,7 @@ private void loadParams(String... script) {
488489
builder.append(";");
489490
String request = builder.toString();
490491

491-
// Log.d("params", request);
492+
Log.d("params", request);
492493

493494
load(request);
494495
}

sample/sample.iml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,5 @@
120120
<orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.0@aar" level="project" />
121121
<orderEntry type="module" module-name="bootpay" />
122122
<orderEntry type="module" module-name="bootpay" />
123-
<orderEntry type="module" module-name="bootpay" />
124-
<orderEntry type="module" module-name="bootpay" />
125123
</component>
126124
</module>

sample/src/main/java/bootpay/co/kr/samplepayment/NativeActivity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public class NativeActivity extends Activity implements BootpayRestImplement {
3434
private String application_id = "5b8f6a4d396fa665fdc2b5e8";
3535

3636

37+
38+
3739
@Override
3840
protected void onCreate(Bundle savedInstanceState) {
3941
super.onCreate(savedInstanceState);
@@ -81,12 +83,13 @@ void goPGPay() {
8183
.setMethod(Method.CARD)
8284
.setBootExtra(bootExtra)
8385
.setBootUser(bootUser)
86+
// .setOrderId("1234")
8487
// .setUserPhone("010-1234-5678") // 구매자 전화번호
8588
.setUX(UX.PG_DIALOG)
8689
// .setMethod(Method.CARD) // 결제수단
8790
//.isShowAgree(true)
8891
.setName("bootpay kb card test") // 결제할 상품명
89-
.setOrderId("1234") // 결제 고유번호
92+
.setOrderId("1232352354") // 결제 고유번호
9093
.setPrice(1000) // 결제할 금액
9194
.setAccountExpireAt("2019-07-16")
9295
.addItem("마우스", 1, "ITEM_CODE_MOUSE", 500) // 주문정보에 담길 상품정보, 통계를 위해 사용

0 commit comments

Comments
 (0)