4/22/1
This commit is contained in:
@@ -30,7 +30,7 @@ class PaymobResponseWallet {
|
||||
class PaymobPaymentWallet {
|
||||
static PaymobPaymentWallet instance = PaymobPaymentWallet();
|
||||
|
||||
bool _isInitialized = false;
|
||||
bool _isInitializedWallet = false;
|
||||
|
||||
final Dio _dio = Dio();
|
||||
final _baseURL = 'https://accept.paymob.com/api/';
|
||||
@@ -55,7 +55,7 @@ class PaymobPaymentWallet {
|
||||
/// The expiration time of this payment token in seconds. (The maximum is 3600 seconds which is an hour)
|
||||
int userTokenExpiration = 300,
|
||||
}) async {
|
||||
if (_isInitialized) {
|
||||
if (_isInitializedWallet) {
|
||||
return true;
|
||||
}
|
||||
_dio.options.baseUrl = _baseURL;
|
||||
@@ -65,9 +65,9 @@ class PaymobPaymentWallet {
|
||||
_iFrameID = iFrameID;
|
||||
_iFrameURL =
|
||||
'https://accept.paymobsolutions.com/api/acceptance/iframes/$_iFrameID?payment_token=';
|
||||
_isInitialized = true;
|
||||
_isInitializedWallet = true;
|
||||
_userTokenExpiration = userTokenExpiration;
|
||||
return _isInitialized;
|
||||
return _isInitializedWallet;
|
||||
}
|
||||
|
||||
/// Get authentication token, which is valid for one hour from the creation time.
|
||||
@@ -196,7 +196,7 @@ class PaymobPaymentWallet {
|
||||
|
||||
/// The billing data related to the customer related to this payment.
|
||||
PaymobBillingDataWallet? billingData}) async {
|
||||
if (!_isInitialized) {
|
||||
if (!_isInitializedWallet) {
|
||||
throw Exception(
|
||||
'PaymobPayment is not initialized call:`PaymobPayment.instance.initialize`');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user