Skip to content

Commit

Permalink
Merge pull request #4 from ashrafamin91/3.33.0
Browse files Browse the repository at this point in the history
* Added C2P
  • Loading branch information
apis17 authored Oct 11, 2023
2 parents 68dce09 + 683a2e3 commit 3eeb1ca
Show file tree
Hide file tree
Showing 10 changed files with 678 additions and 666 deletions.
1,308 changes: 654 additions & 654 deletions molpayxdk/src/main/assets/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion molpayxdk/src/main/assets/molpay-mobile-xdk-www/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <!-- <meta name="viewport" content="width=device-width"> --> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="format-detection" content="telephone=no"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <link rel="stylesheet" href="styles/vendor.2f041884.css"> <link rel="stylesheet" href="styles/main.9487ad1d.css"> </head> <body ng-app="molpayXsdkApp"> <div class="header"> </div> <div id="app-body" class="app-body container-fluid"> <div class="row"> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4" ng-view=""></div> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> </div> </div> <div ng-cloak ng-show="isStarting || isLoading" class="text-center"> <br> <p>{{label_preparing}}</p> <p>{{label_pleasewait}}</p> </div> <div class="footer"> </div> <div ng-cloak ng-show="isLoading || D7ARequeryActiveNow" class="loading text-center vertical-center"> <div class="loadingbackground"></div> <i class="fa fa-spinner fa-spin fa-3x"></i> <div class="loading-text">{{label_loading}}</div> </div> <script src="scripts/vendor.b5b76176.js"></script> <script src="scripts/scripts.92281eb9.js"></script> </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <!-- <meta name="viewport" content="width=device-width"> --> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="format-detection" content="telephone=no"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <link rel="stylesheet" href="styles/vendor.2f041884.css"> <link rel="stylesheet" href="styles/main.08e504b6.css"> </head> <body ng-app="molpayXsdkApp"> <div class="header"> </div> <div id="debugger" ng-if="isInternalDebugging">...</div> <div id="app-body" class="app-body container-fluid"> <div class="row"> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4" ng-view=""></div> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> </div> </div> <div ng-cloak ng-show="isStarting || isLoading" class="text-center"> <br> <p>{{label_preparing}}</p> <p>{{label_pleasewait}}</p> </div> <div class="footer"> </div> <div ng-cloak ng-show="isLoading || D7ARequeryActiveNow" class="loading text-center vertical-center"> <div class="loadingbackground"></div> <i class="fa fa-spinner fa-spin fa-3x"></i> <div class="loading-text">{{label_loading}}</div> </div> <div class="iframe-container slide-in" id="mastercardc2pModal" style="display: none;"> <div class="loadingbackground"></div> <iframe class="iframe-checkout" id="mastercardc2pIframe" name="checkout-iframe" title="mastercardc2pIframe" src=""></iframe> </div> <div id="extra"> <!-- <script src="https://sandbox.src.mastercard.com/srci/merchant/2/lib.js?dpaId=b3d12697-975b-47a3-8656-2a81647d8ded&locale=en_US"></script> --> <script type="module" src="https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.esm.js"></script> </div> <script src="scripts/vendor.6fadcbba.js"></script> <script src="scripts/scripts.2c67fe65.js"></script> </body> </html>

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion molpayxdk/src/main/java/com/molpay/molpayxdk/MOLPayActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.webkit.CookieManager;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
Expand Down Expand Up @@ -86,6 +87,8 @@ public class MOLPayActivity extends AppCompatActivity {
public final static String mp_non_3DS = "mp_non_3DS";
public final static String mp_card_list_disabled = "mp_card_list_disabled";
public final static String mp_disabled_channels = "mp_disabled_channels";
public final static String mp_dpa_id = "mp_dpa_id";
public final static String mp_company = "mp_company";

public final static String MOLPAY = "MOLPAY";
private final static String mpopenmolpaywindow = "mpopenmolpaywindow://";
Expand All @@ -95,7 +98,7 @@ public class MOLPayActivity extends AppCompatActivity {
private final static String mppinstructioncapture = "mppinstructioncapture://";
private final static String module_id = "module_id";
private final static String wrapper_version = "wrapper_version";
private final static String wrapperVersion = "6";
private final static String wrapperVersion = "0";

private String base64Img;
private String filename;
Expand Down Expand Up @@ -179,11 +182,19 @@ protected void onCreate(Bundle savedInstanceState) {
mpMOLPayUI.setVisibility(View.GONE);

// Load the main ui
mpMainUI.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
mpMainUI.getSettings().setAllowUniversalAccessFromFileURLs(true);
mpMainUI.setWebViewClient(new MPMainUIWebClient());
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
cookieManager.setAcceptThirdPartyCookies(mpMainUI, true);
cookieManager.setAcceptThirdPartyCookies(mpMOLPayUI, true);
}
mpMainUI.loadUrl("file:///android_asset/molpay-mobile-xdk-www/index.html");

// Configure MOLPay ui
mpMOLPayUI.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
mpMOLPayUI.getSettings().setAllowUniversalAccessFromFileURLs(true);
mpMOLPayUI.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mpMOLPayUI.getSettings().setSupportMultipleWindows(true);
Expand Down Expand Up @@ -368,6 +379,7 @@ public boolean onCreateWindow(WebView view, boolean dialog, boolean userGesture,
mpBankUI = new WebView(MOLPayActivity.this);

mpBankUI.getSettings().setJavaScriptEnabled(true);
mpBankUI.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
mpBankUI.getSettings().setAllowUniversalAccessFromFileURLs(true);
mpBankUI.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mpBankUI.getSettings().setSupportMultipleWindows(true);
Expand Down

0 comments on commit 3eeb1ca

Please sign in to comment.