From 161935febec5a47f041e277e178b1996ec6c0058 Mon Sep 17 00:00:00 2001 From: bingbong Date: Thu, 2 Sep 2021 16:49:06 +0900 Subject: [PATCH 1/3] hotfix : set android WebSettings CacheMode LOAD_NO_CACHE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 카카오페이 최종 결제 안되는 문제 수정 --- .../main/java/kr/iamport/capacitor/IamportActivity.java | 7 ++++++- example/package.json | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/kr/iamport/capacitor/IamportActivity.java b/android/src/main/java/kr/iamport/capacitor/IamportActivity.java index b0d5c73..c5b391d 100644 --- a/android/src/main/java/kr/iamport/capacitor/IamportActivity.java +++ b/android/src/main/java/kr/iamport/capacitor/IamportActivity.java @@ -4,6 +4,7 @@ import android.app.Application; import android.content.Intent; import android.os.Bundle; +import android.webkit.CookieManager; import android.webkit.WebSettings; import android.webkit.WebView; @@ -27,7 +28,11 @@ protected void onCreate(Bundle savedInstanceState) { WebSettings settings = webview.getSettings(); settings.setJavaScriptEnabled(true); settings.setDomStorageEnabled(true); - settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); + settings.setCacheMode(WebSettings.LOAD_NO_CACHE); + + CookieManager cookieManager = CookieManager.getInstance(); + cookieManager.setAcceptCookie(true); + cookieManager.setAcceptThirdPartyCookies(webview, true); webview.loadUrl(IamportCapacitor.WEBVIEW_PATH); webview.setWebChromeClient(new IamportWebChromeClient()); diff --git a/example/package.json b/example/package.json index 5da8c90..b6e8133 100644 --- a/example/package.json +++ b/example/package.json @@ -58,7 +58,8 @@ ] }, "devDependencies": { - "@capacitor/cli": "1.3.0" + "@capacitor/cli": "1.3.0", + "jetifier": "^2.0.0" }, "description": "An Ionic project" } From 5c8b6dd863ed74f884f498362160e7e3d222cce5 Mon Sep 17 00:00:00 2001 From: bingbong Date: Thu, 2 Sep 2021 19:14:29 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat=20:=20=EB=8B=A4=EB=82=A0=20=ED=9C=B4?= =?UTF-8?q?=EB=8C=80=ED=8F=B0=20=EB=B3=B8=EC=9D=B8=EC=9D=B8=EC=A6=9D=20red?= =?UTF-8?q?irect=20=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/iamport/iamport_flutter/issues/10 1번 이슈에 관한 수정 --- src/plugin.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugin.ts b/src/plugin.ts index 5f4d698..78c5846 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -92,7 +92,10 @@ export class IMP implements IamportCapacitorPlugin { const newOptions = { type: 'certification', userCode, - data, + data: { + ...data, + m_redirect_url: REDIRECT_URL, + }, triggerCallback: this.triggerCallback, redirectUrl: REDIRECT_URL, }; From 98be949b6f71976625482e1f9a3c078a2b56fba8 Mon Sep 17 00:00:00 2001 From: bingbong Date: Thu, 2 Sep 2021 16:49:06 +0900 Subject: [PATCH 3/3] hotfix : set android WebSettings CacheMode LOAD_NO_CACHE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 카카오페이 최종 결제 안되는 문제 수정 --- .../main/java/kr/iamport/capacitor/IamportActivity.java | 7 ++++++- example/package.json | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/kr/iamport/capacitor/IamportActivity.java b/android/src/main/java/kr/iamport/capacitor/IamportActivity.java index b0d5c73..c5b391d 100644 --- a/android/src/main/java/kr/iamport/capacitor/IamportActivity.java +++ b/android/src/main/java/kr/iamport/capacitor/IamportActivity.java @@ -4,6 +4,7 @@ import android.app.Application; import android.content.Intent; import android.os.Bundle; +import android.webkit.CookieManager; import android.webkit.WebSettings; import android.webkit.WebView; @@ -27,7 +28,11 @@ protected void onCreate(Bundle savedInstanceState) { WebSettings settings = webview.getSettings(); settings.setJavaScriptEnabled(true); settings.setDomStorageEnabled(true); - settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); + settings.setCacheMode(WebSettings.LOAD_NO_CACHE); + + CookieManager cookieManager = CookieManager.getInstance(); + cookieManager.setAcceptCookie(true); + cookieManager.setAcceptThirdPartyCookies(webview, true); webview.loadUrl(IamportCapacitor.WEBVIEW_PATH); webview.setWebChromeClient(new IamportWebChromeClient()); diff --git a/example/package.json b/example/package.json index 5da8c90..b6e8133 100644 --- a/example/package.json +++ b/example/package.json @@ -58,7 +58,8 @@ ] }, "devDependencies": { - "@capacitor/cli": "1.3.0" + "@capacitor/cli": "1.3.0", + "jetifier": "^2.0.0" }, "description": "An Ionic project" }