Skip to content

Commit

Permalink
Release 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MOLPay Mobile committed Nov 29, 2016
1 parent f622870 commit 7d32ddf
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 107 deletions.
86 changes: 43 additions & 43 deletions MOLPayActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class MOLPayActivity : Activity
private const String mpcloseallwindows = "mpcloseallwindows://";
private const String mptransactionresults = "mptransactionresults://";
private const String mprunscriptonpopup = "mprunscriptonpopup://";
private const String mppinstructioncapture = "mppinstructioncapture://";
private const String mppinstructioncapture = "mppinstructioncapture://";
private const String molpayresulturl = "https://www.onlinepayment.com.my/MOLPay/result.php";
private const String molpaynbepayurl = "https://www.onlinepayment.com.my/MOLPay/nbepay.php";
private const String module_id = "module_id";
Expand All @@ -69,11 +69,11 @@ public class MOLPayActivity : Activity
private static Boolean isMainUILoaded = false;
private static Boolean isClosingReceipt = false;

public class Image
{
public String filename { get; set; }
public String base64ImageUrlData { get; set; }
}
public class Image
{
public String filename { get; set; }
public String base64ImageUrlData { get; set; }
}

private static void CloseMolpay()
{
Expand All @@ -85,29 +85,29 @@ private static void CloseMolpay()
}
}

public override void OnBackPressed()
{
CloseMolpay();
}

public override bool OnCreateOptionsMenu(IMenu menu)
{
MenuInflater.Inflate(Resource.Menu.menu_molpay, menu);

return base.OnCreateOptionsMenu(menu);
}

public override bool OnOptionsItemSelected(IMenuItem item)
{
switch (item.ItemId)
{
case Resource.Id.closeBtn:
CloseMolpay();
return true;
default:
return base.OnOptionsItemSelected(item);
}
}
public override void OnBackPressed()
{
CloseMolpay();
}

public override bool OnCreateOptionsMenu(IMenu menu)
{
MenuInflater.Inflate(Resource.Menu.menu_molpay, menu);

return base.OnCreateOptionsMenu(menu);
}

public override bool OnOptionsItemSelected(IMenuItem item)
{
switch (item.ItemId)
{
case Resource.Id.closeBtn:
CloseMolpay();
return true;
default:
return base.OnOptionsItemSelected(item);
}
}

protected override void OnCreate(Bundle savedInstanceState)
{
Expand All @@ -133,17 +133,17 @@ protected override void OnCreate(Bundle savedInstanceState)
mpMOLPayUI.Visibility = ViewStates.Gone;
tw.Visibility = ViewStates.Gone;

mpMainUI.Settings.AllowUniversalAccessFromFileURLs = true;
mpMainUI.Settings.AllowUniversalAccessFromFileURLs = true;
mpMainUI.LoadUrl("file:///android_asset/molpay-mobile-xdk-www/index.html");
mpMainUI.SetWebViewClient(new MPMainUIWebClient());

mpMOLPayUI.Settings.AllowUniversalAccessFromFileURLs = true;
mpMOLPayUI.Settings.JavaScriptCanOpenWindowsAutomatically = true;
mpMOLPayUI.Settings.SetSupportMultipleWindows(true);
mpMOLPayUI.Settings.AllowUniversalAccessFromFileURLs = true;
mpMOLPayUI.Settings.JavaScriptCanOpenWindowsAutomatically = true;
mpMOLPayUI.Settings.SetSupportMultipleWindows(true);
mpMOLPayUI.SetWebViewClient(new MPMOLPayUIWebClient());
mpMOLPayUI.SetWebChromeClient(new MPMOLPayUIWebChromeClient());

CookieManager.Instance.SetAcceptCookie(true);
CookieManager.Instance.SetAcceptCookie(true);
}

public class MPMainUIWebClient : WebViewClient
Expand Down Expand Up @@ -305,9 +305,9 @@ public override Boolean OnCreateWindow(WebView view, bool dialog, bool userGestu
mpBankUI.Settings.JavaScriptCanOpenWindowsAutomatically = true;
mpBankUI.Settings.SetSupportMultipleWindows(true);
mpBankUI.SetWebViewClient(new MPBankUIWebClient());
mpBankUI.SetWebChromeClient(new MPBankUIWebChromeClient());
mpBankUI.SetWebChromeClient(new MPBankUIWebChromeClient());

mpBankUI.LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent);
mpBankUI.LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent);
container.AddView(mpBankUI);
WebView.WebViewTransport transport = (WebView.WebViewTransport)resultMsg.Obj;
transport.WebView = mpBankUI;
Expand Down Expand Up @@ -335,13 +335,13 @@ public override void OnPageFinished(WebView view, String url)
}
}

public class MPBankUIWebChromeClient : WebChromeClient
{
public override void OnCloseWindow(WebView window)
{
CloseMolpay();
}
}
public class MPBankUIWebChromeClient : WebChromeClient
{
public override void OnCloseWindow(WebView window)
{
CloseMolpay();
}
}

private static void NativeWebRequestUrlUpdates(String url)
{
Expand Down
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.34eb91d2.css"> <link rel="stylesheet" href="styles/main.d7e0b867.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-show="isStarting || isLoading" class="text-center"> <br> <p>Preparing...</p> <p>Please wait.</p> </div> <div class="footer"> </div> <div 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">Loading...</div> </div> <script src="scripts/vendor.8ef18f5b.js"></script> <script src="scripts/scripts.e4c7562a.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.34eb91d2.css"> <link rel="stylesheet" href="styles/main.d7e0b867.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-show="isStarting || isLoading" class="text-center"> <br> <p>Preparing...</p> <p>Please wait.</p> </div> <div class="footer"> </div> <div 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">Loading...</div> </div> <script src="scripts/vendor.80b0fea7.js"></script> <script src="scripts/scripts.6a95b82a.js"></script> </body> </html>

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

86 changes: 43 additions & 43 deletions MOLPayXDKExample/MOLPayXDKExample/MOLPayActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class MOLPayActivity : Activity
private const String mpcloseallwindows = "mpcloseallwindows://";
private const String mptransactionresults = "mptransactionresults://";
private const String mprunscriptonpopup = "mprunscriptonpopup://";
private const String mppinstructioncapture = "mppinstructioncapture://";
private const String mppinstructioncapture = "mppinstructioncapture://";
private const String molpayresulturl = "https://www.onlinepayment.com.my/MOLPay/result.php";
private const String molpaynbepayurl = "https://www.onlinepayment.com.my/MOLPay/nbepay.php";
private const String module_id = "module_id";
Expand All @@ -69,11 +69,11 @@ public class MOLPayActivity : Activity
private static Boolean isMainUILoaded = false;
private static Boolean isClosingReceipt = false;

public class Image
{
public String filename { get; set; }
public String base64ImageUrlData { get; set; }
}
public class Image
{
public String filename { get; set; }
public String base64ImageUrlData { get; set; }
}

private static void CloseMolpay()
{
Expand All @@ -85,29 +85,29 @@ private static void CloseMolpay()
}
}

public override void OnBackPressed()
{
CloseMolpay();
}

public override bool OnCreateOptionsMenu(IMenu menu)
{
MenuInflater.Inflate(Resource.Menu.menu_molpay, menu);

return base.OnCreateOptionsMenu(menu);
}

public override bool OnOptionsItemSelected(IMenuItem item)
{
switch (item.ItemId)
{
case Resource.Id.closeBtn:
CloseMolpay();
return true;
default:
return base.OnOptionsItemSelected(item);
}
}
public override void OnBackPressed()
{
CloseMolpay();
}

public override bool OnCreateOptionsMenu(IMenu menu)
{
MenuInflater.Inflate(Resource.Menu.menu_molpay, menu);

return base.OnCreateOptionsMenu(menu);
}

public override bool OnOptionsItemSelected(IMenuItem item)
{
switch (item.ItemId)
{
case Resource.Id.closeBtn:
CloseMolpay();
return true;
default:
return base.OnOptionsItemSelected(item);
}
}

protected override void OnCreate(Bundle savedInstanceState)
{
Expand All @@ -133,17 +133,17 @@ protected override void OnCreate(Bundle savedInstanceState)
mpMOLPayUI.Visibility = ViewStates.Gone;
tw.Visibility = ViewStates.Gone;

mpMainUI.Settings.AllowUniversalAccessFromFileURLs = true;
mpMainUI.Settings.AllowUniversalAccessFromFileURLs = true;
mpMainUI.LoadUrl("file:///android_asset/molpay-mobile-xdk-www/index.html");
mpMainUI.SetWebViewClient(new MPMainUIWebClient());

mpMOLPayUI.Settings.AllowUniversalAccessFromFileURLs = true;
mpMOLPayUI.Settings.JavaScriptCanOpenWindowsAutomatically = true;
mpMOLPayUI.Settings.SetSupportMultipleWindows(true);
mpMOLPayUI.Settings.AllowUniversalAccessFromFileURLs = true;
mpMOLPayUI.Settings.JavaScriptCanOpenWindowsAutomatically = true;
mpMOLPayUI.Settings.SetSupportMultipleWindows(true);
mpMOLPayUI.SetWebViewClient(new MPMOLPayUIWebClient());
mpMOLPayUI.SetWebChromeClient(new MPMOLPayUIWebChromeClient());

CookieManager.Instance.SetAcceptCookie(true);
CookieManager.Instance.SetAcceptCookie(true);
}

public class MPMainUIWebClient : WebViewClient
Expand Down Expand Up @@ -305,9 +305,9 @@ public override Boolean OnCreateWindow(WebView view, bool dialog, bool userGestu
mpBankUI.Settings.JavaScriptCanOpenWindowsAutomatically = true;
mpBankUI.Settings.SetSupportMultipleWindows(true);
mpBankUI.SetWebViewClient(new MPBankUIWebClient());
mpBankUI.SetWebChromeClient(new MPBankUIWebChromeClient());
mpBankUI.SetWebChromeClient(new MPBankUIWebChromeClient());

mpBankUI.LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent);
mpBankUI.LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent);
container.AddView(mpBankUI);
WebView.WebViewTransport transport = (WebView.WebViewTransport)resultMsg.Obj;
transport.WebView = mpBankUI;
Expand Down Expand Up @@ -335,13 +335,13 @@ public override void OnPageFinished(WebView view, String url)
}
}

public class MPBankUIWebChromeClient : WebChromeClient
{
public override void OnCloseWindow(WebView window)
{
CloseMolpay();
}
}
public class MPBankUIWebChromeClient : WebChromeClient
{
public override void OnCloseWindow(WebView window)
{
CloseMolpay();
}
}

private static void NativeWebRequestUrlUpdates(String url)
{
Expand Down
4 changes: 2 additions & 2 deletions MOLPayXDKExample/MOLPayXDKExample/MOLPayXDKExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\fonts\fontawesome-webfont.woff2" />
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\images\ImageUnavailable.png" />
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\images\poweredByMOLPay.png" />
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\scripts\scripts.e4c7562a.js" />
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\scripts\vendor.8ef18f5b.js" />
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\scripts\scripts.6a95b82a.js" />
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\scripts\vendor.80b0fea7.js" />
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\styles\main.d7e0b867.css" />
<AndroidAsset Include="Assets\molpay-mobile-xdk-www\styles\vendor.34eb91d2.css" />
</ItemGroup>
Expand Down
26 changes: 13 additions & 13 deletions MOLPayXDKExample/MOLPayXDKExample/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ protected override void OnCreate(Bundle bundle)

Dictionary<String, object> paymentDetails = new Dictionary<String, object>();
paymentDetails.Add(MOLPayActivity.mp_amount, "");
paymentDetails.Add(MOLPayActivity.mp_username, "");
paymentDetails.Add(MOLPayActivity.mp_password, "");
paymentDetails.Add(MOLPayActivity.mp_merchant_ID, "");
paymentDetails.Add(MOLPayActivity.mp_app_name, "");
paymentDetails.Add(MOLPayActivity.mp_order_ID, "");
paymentDetails.Add(MOLPayActivity.mp_currency, "MYR");
paymentDetails.Add(MOLPayActivity.mp_country, "MY");
paymentDetails.Add(MOLPayActivity.mp_verification_key, "");
paymentDetails.Add(MOLPayActivity.mp_channel, "");
paymentDetails.Add(MOLPayActivity.mp_bill_description, "");
paymentDetails.Add(MOLPayActivity.mp_bill_name, "");
paymentDetails.Add(MOLPayActivity.mp_bill_email, "");
paymentDetails.Add(MOLPayActivity.mp_bill_mobile, "");
paymentDetails.Add(MOLPayActivity.mp_username, "");
paymentDetails.Add(MOLPayActivity.mp_password, "");
paymentDetails.Add(MOLPayActivity.mp_merchant_ID, "");
paymentDetails.Add(MOLPayActivity.mp_app_name, "");
paymentDetails.Add(MOLPayActivity.mp_order_ID, "");
paymentDetails.Add(MOLPayActivity.mp_currency, "MYR");
paymentDetails.Add(MOLPayActivity.mp_country, "MY");
paymentDetails.Add(MOLPayActivity.mp_verification_key, "");
paymentDetails.Add(MOLPayActivity.mp_channel, "");
paymentDetails.Add(MOLPayActivity.mp_bill_description, "");
paymentDetails.Add(MOLPayActivity.mp_bill_name, "");
paymentDetails.Add(MOLPayActivity.mp_bill_email, "");
paymentDetails.Add(MOLPayActivity.mp_bill_mobile, "");
paymentDetails.Add(MOLPayActivity.mp_channel_editing, false);
paymentDetails.Add(MOLPayActivity.mp_editing_enabled, false);
//paymentDetails.Add(MOLPayActivity.mp_is_escrow, "");
Expand Down
2 changes: 1 addition & 1 deletion 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.34eb91d2.css"> <link rel="stylesheet" href="styles/main.d7e0b867.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-show="isStarting || isLoading" class="text-center"> <br> <p>Preparing...</p> <p>Please wait.</p> </div> <div class="footer"> </div> <div 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">Loading...</div> </div> <script src="scripts/vendor.8ef18f5b.js"></script> <script src="scripts/scripts.e4c7562a.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.34eb91d2.css"> <link rel="stylesheet" href="styles/main.d7e0b867.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-show="isStarting || isLoading" class="text-center"> <br> <p>Preparing...</p> <p>Please wait.</p> </div> <div class="footer"> </div> <div 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">Loading...</div> </div> <script src="scripts/vendor.80b0fea7.js"></script> <script src="scripts/scripts.6a95b82a.js"></script> </body> </html>
1 change: 1 addition & 0 deletions molpay-mobile-xdk-www/scripts/scripts.6a95b82a.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion molpay-mobile-xdk-www/scripts/scripts.e4c7562a.js

This file was deleted.

Large diffs are not rendered by default.

0 comments on commit 7d32ddf

Please sign in to comment.