Skip to content

Commit 380afa4

Browse files
author
ehowlsla
committed
account_expire_at 추가
1 parent 2d823bb commit 380afa4

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ allprojects {
3232
```gradle
3333
dependencies {
3434
...
35-
implementation 'com.github.bootpay:client_android_java:2.0.102'
35+
implementation 'com.github.bootpay:client_android_java:2.0.103'
3636
}
3737
```
3838

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@ public Builder setMethod(Method method) {
228228
return this;
229229
}
230230

231+
public Builder setAccountExpireAt(String account_expire_at) {
232+
result.setAccountExpireAt(account_expire_at);
233+
return this;
234+
}
235+
231236
public Builder setModel(Request request) {
232237
result = request;
233238
return this;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ internal class BootpayWebView @JvmOverloads constructor(context: Context, attrs:
107107
extraQuota()
108108
),
109109
params(),
110-
"account_expire_at: '2018-08-10'",
110+
accountExpireAt(),
111111
order_id()
112112
),
113113
error(),
@@ -244,6 +244,8 @@ internal class BootpayWebView @JvmOverloads constructor(context: Context, attrs:
244244

245245
private fun method() = request?.method?.let { "method:'$it'" } ?: ""
246246

247+
private fun accountExpireAt() = request?.account_expire_at?.let { "account_expire_at:'$it'" } ?: ""
248+
247249
private fun params(): String {
248250
return if (request?.params.isNullOrEmpty())
249251
"params:''"

bootpay/src/main/java/kr/co/bootpay/model/Request.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Request {
1212
var pg: String = ""
1313
var order_id: String = ""
1414
var method: String = ""
15+
var account_expire_at: String = ""
1516
var unit: String = ""
1617
var feedback_url: String = ""
1718
var isShowAgree: Boolean = false
@@ -46,6 +47,10 @@ class Request {
4647
@Throws(JSONException::class)
4748
fun <T> getParamsOfObject(cls: Class<T>): T = Gson().fromJson(params, cls)
4849

50+
fun setAccountExpireAt(value: String) {
51+
this.account_expire_at = value
52+
}
53+
4954
fun setParams(json: JSONObject) {
5055
this.params = json.toString()
5156
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ public void startTrace() {
6060
public void onClick_request(View v) {
6161
// 결제호출
6262
Bootpay.init(getFragmentManager())
63-
.setApplicationId("59a7e647396fa64fcad4a8c2") // 해당 프로젝트(안드로이드)의 application id 값
63+
.setApplicationId("5b14c0ffb6d49c40cda92c4e") // 해당 프로젝트(안드로이드)의 application id 값
6464
.setPG(PG.DANAL) // 결제할 PG 사
6565
.setUserPhone("010-1234-5678") // 구매자 전화번호
66-
.setMethod(Method.PHONE) // 결제수단
66+
.setMethod(Method.VBANK) // 결제수단
6767
.setName("맥북프로임다") // 결제할 상품명
68-
.setOrderId("1234") // 결제 고유번호
68+
.setOrderId("1234") // 결제 고유번호expire_month
69+
// .setAccountExpireAt("2018-09-22")
6970
.setQuotas(new int[] {0,2,3}) // 일시불, 2개월, 3개월 할부 허용, 할부는 최대 12개월까지 사용됨 (5만원 이상 구매시 할부허용 범위)
7071
.setPrice(50000) // 결제할 금액
7172
.addItem("마우스", 1, "ITEM_CODE_MOUSE", 100) // 주문정보에 담길 상품정보, 통계를 위해 사용

0 commit comments

Comments
 (0)