Skip to content

Commit

Permalink
Merge pull request #48 from iamport/fix/webview-no-cache
Browse files Browse the repository at this point in the history
카카오페이 최종 결제 안되는 문제 수정
  • Loading branch information
kjh5833 authored Sep 30, 2021
2 parents eabe6ed + a824bea commit 7db95ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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());
Expand Down
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
]
},
"devDependencies": {
"@capacitor/cli": "1.3.0"
"@capacitor/cli": "1.3.0",
"jetifier": "^2.0.0"
},
"description": "An Ionic project"
}
5 changes: 4 additions & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit 7db95ee

Please sign in to comment.