Skip to content

Commit b878e45

Browse files
committed
removePayment 버그 수정
1 parent 7759448 commit b878e45

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,9 @@ public BootpayWebView setRequest(Request request) {
276276
return this;
277277
}
278278

279-
public String removePaymentWindow() {
280-
return "window.BootPay.removePaymentWindow();)";
279+
public void removePaymentWindow() {
280+
load("window.BootPay.removePaymentWindow();");
281+
// return "window.BootPay.removePaymentWindow();)";
281282
}
282283

283284
public BootpayWebView setDialog(Dialog dialog) {

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,17 @@ public void onClick_request(View v) {
7272
}
7373

7474
void goPGPay() {
75-
BootUser bootUser = new BootUser().setPhone("010-1234-5678").setAddr("서울시 동작구 상도로 369").setEmail("[email protected]");
75+
BootUser bootUser = new BootUser().setAddr("서울시 동작구 상도로 369").setEmail("[email protected]");
7676
BootExtra bootExtra = new BootExtra().setQuotas(new int[] {0,2,3});
7777
// bootExtra.setEscrow(1);
7878

7979
Bootpay.init(getFragmentManager())
8080
.setContext(this)
8181
.setApplicationId(application_id) // 해당 프로젝트(안드로이드)의 application id 값
82-
.setPG(PG.WELCOME) // 결제할 PG 사
83-
.setMethod(Method.CARD)
82+
.setPG(PG.DANAL) // 결제할 PG 사
83+
.setMethod(Method.PHONE)
84+
// .setEasyPayUserToken("wef")
85+
// .setMethodList(Arrays.asList(Method.EASY_CARD, Method.PHONE, Method.BANK, Method.CARD, Method.VBANK))
8486
.setBootExtra(bootExtra)
8587
.setBootUser(bootUser)
8688
.setOrderId("1234")
@@ -173,9 +175,10 @@ void startBootPay(String userToken) {
173175
Bootpay.init(getFragmentManager())
174176
.setContext(this)
175177
.setApplicationId(application_id) // 해당 프로젝트(안드로이드)의 application id 값
176-
.setPG(PG.ONESTORE) // 결제할 PG 사
178+
.setPG(PG.PAYAPP) // 결제할 PG 사
177179
.setEasyPayUserToken(userToken)
178-
.setMethodList(Arrays.asList(Method.EASY_CARD, Method.PHONE, Method.BANK, Method.CARD, Method.VBANK))
180+
.setMethod(Method.EASY_CARD)
181+
// .setMethodList(Arrays.asList(Method.EASY_CARD, Method.PHONE, Method.BANK, Method.CARD, Method.VBANK))
179182
.setBootExtra(bootExtra)
180183
.setBootUser(bootUser)
181184
// .setUserPhone("010-1234-5678") // 구매자 전화번호
@@ -191,8 +194,10 @@ void startBootPay(String userToken) {
191194
.onConfirm(new ConfirmListener() { // 결제가 진행되기 바로 직전 호출되는 함수로, 주로 재고처리 등의 로직이 수행
192195
@Override
193196
public void onConfirm(@Nullable String message) {
197+
194198
if (0 < stuck) Bootpay.confirm(message); // 재고가 있을 경우.
195199
else Bootpay.removePaymentWindow(); // 재고가 없어 중간에 결제창을 닫고 싶을 경우
200+
196201
Log.d("confirm", message);
197202
}
198203
})

0 commit comments

Comments
 (0)