-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MOLPay-MobileDev
committed
Jun 20, 2018
1 parent
ef2a05d
commit 3c15c90
Showing
2 changed files
with
25 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ class _MyAppState extends State<MyApp> { | |
var paymentDetails = { | ||
// Mandatory String. A value more than '1.00' | ||
'mp_amount': '1.1', | ||
|
||
// Mandatory String. Values obtained from MOLPay | ||
'mp_username': '', | ||
'mp_password': '', | ||
|
@@ -40,84 +41,52 @@ class _MyAppState extends State<MyApp> { | |
'mp_verification_key': '', | ||
|
||
// Mandatory String. Payment values | ||
'mp_order_ID': '', | ||
'mp_order_ID': 'Flutter0002', | ||
'mp_currency': 'MYR', | ||
'mp_country': 'MY', | ||
|
||
// Optional String. | ||
'mp_channel': | ||
'', // Use 'multi' for all available channels option. For individual channel seletion, please refer to https://github.com/MOLPay/molpay-mobile-xdk-examples/blob/master/channel_list.tsv. | ||
'mp_bill_description': 'test payment', | ||
'mp_channel': '', // Use 'multi' for all available channels option. For individual channel seletion, please refer to "Channel Parameter" in "Channel Lists" in the MOLPay API Spec for Merchant pdf. | ||
'mp_bill_description': 'Flutter payment test', | ||
'mp_bill_name': 'anyname', | ||
'mp_bill_email': '[email protected]', | ||
'mp_bill_mobile': '0161111111', | ||
'mp_channel_editing': | ||
false, // Option to allow channel selection. | ||
'mp_editing_enabled': | ||
false, // Option to allow billing information editing. | ||
// 'mp_channel_editing': true, // Option to allow channel selection. | ||
'mp_editing_enabled': true, // Option to allow billing information editing. | ||
|
||
// Optional for Escrow | ||
'mp_is_escrow': | ||
'', // Optional for Escrow, put "1" to enable escrow | ||
// 'mp_is_escrow': '', // Optional for Escrow, put "1" to enable escrow | ||
|
||
// Optional for credit card BIN restrictions | ||
'mp_bin_lock': [ | ||
'414170', | ||
'414171' | ||
], // Optional for credit card BIN restrictions | ||
'mp_bin_lock_err_msg': | ||
'Only UOB allowed', // Optional for credit card BIN restrictions | ||
'mp_bin_lock': ['414170', '414171'], // Optional for credit card BIN restrictions | ||
'mp_bin_lock_err_msg': 'Only UOB allowed', // Optional for credit card BIN restrictions | ||
|
||
// For transaction request use only, do not use this on payment process | ||
'mp_transaction_id': | ||
'', // Optional, provide a valid cash channel transaction id here will display a payment instruction screen. | ||
'mp_request_type': | ||
'', // Optional, set 'Status' when doing a transactionRequest | ||
// 'mp_transaction_id': '', // Optional, provide a valid cash channel transaction id here will display a payment instruction screen. | ||
// 'mp_request_type': '', // Optional, set 'Status' when doing a transactionRequest | ||
|
||
// Optional, use this to customize the UI theme for the payment info screen, the original XDK custom.css file is provided at Example project source for reference and implementation. Required cordova-plugin-file to be installed | ||
'mp_custom_css_url': '', | ||
// Optional, use this to customize the UI theme for the payment info screen, the original XDK custom.css file is provided at Example project source for reference and implementation. | ||
// 'mp_custom_css_url': '', | ||
|
||
// Optional, set the token id to nominate a preferred token as the default selection, set "new" to allow new card only | ||
'mp_preferred_token': '', | ||
// 'mp_preferred_token': '', | ||
|
||
// Optional, credit card transaction type, set "AUTH" to authorize the transaction | ||
'mp_tcctype': '', | ||
// 'mp_tcctype': '', | ||
|
||
// Optional, set true to process this transaction through the recurring api, please refer the MOLPay Recurring API pdf | ||
'mp_is_recurring': false, | ||
// Optional, set true to process this transaction through the recurring api, please refer the MOLPay Recurring API pdf | ||
// 'mp_is_recurring': false, | ||
|
||
// Optional for channels restriction | ||
'mp_allowed_channels': ['credit', 'credit3'], | ||
// Optional for channels restriction | ||
'mp_allowed_channels': ['credit','credit3'], | ||
|
||
// Optional for sandboxed development environment, set boolean value to enable. | ||
'mp_sandbox_mode': false, | ||
// 'mp_sandbox_mode': false, | ||
|
||
// Optional, required a valid mp_channel value, this will skip the payment info page and go direct to the payment screen. | ||
'mp_express_mode': false, | ||
|
||
// Optional, enable this for extended email format validation based on W3C standards. | ||
'mp_advanced_email_validation_enabled': true, | ||
|
||
// Optional, enable this for extended phone format validation based on Google i18n standards. | ||
'mp_advanced_phone_validation_enabled': true, | ||
|
||
// Optional, explicitly force disable billing name edit. | ||
'mp_bill_name_edit_disabled': false, | ||
|
||
// Optional, explicitly force disable billing email edit. | ||
'mp_bill_email_edit_disabled': false, | ||
|
||
// Optional, explicitly force disable billing mobile edit. | ||
'mp_bill_mobile_edit_disabled': false, | ||
|
||
// Optional, explicitly force disable billing description edit. | ||
'mp_bill_description_edit_disabled': false, | ||
|
||
// Optional, EN, MS, VI, TH, FIL, MY, KM, ID, ZH. | ||
'mp_language': "EN", | ||
|
||
// Optional, enable for online sandbox testing. | ||
'mp_dev_mode': false | ||
// 'mp_express_mode': false, | ||
// 'mp_bill_description_edit_disabled': false, | ||
// 'mp_timeout' : 300, | ||
}; | ||
|
||
String result = await molpay.startMolpay(paymentDetails); | ||
|