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" } 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, };