4/22/1
This commit is contained in:
@@ -254,8 +254,8 @@ class PaymentController extends GetxController {
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) => UsePaypal(
|
||||
sandboxMode: true,
|
||||
clientId: AK.payPalClientIdLive,
|
||||
secretKey: AK.payPalSecretLive,
|
||||
clientId: AK.payPalClientId,
|
||||
secretKey: AK.payPalSecret,
|
||||
returnURL: AppInformation.website,
|
||||
cancelURL: "${AppInformation.website}/cancel",
|
||||
transactions: [
|
||||
@@ -636,10 +636,10 @@ class PaymentController extends GetxController {
|
||||
|
||||
billingData: PaymobBillingDataWallet(),
|
||||
onPayment: (PaymobResponseWallet response) {
|
||||
print('Success: ${response.success}');
|
||||
print('Transaction ID: ${response.transactionID}');
|
||||
print('Response Code: ${response.responseCode}');
|
||||
print('Message: ${response.message}');
|
||||
// print('Success: ${response.success}');
|
||||
// print('Transaction ID: ${response.transactionID}');
|
||||
// print('Response Code: ${response.responseCode}');
|
||||
// print('Message: ${response.message}');
|
||||
|
||||
// print(box.read(BoxName.passengerWalletTotal));//
|
||||
// print(box.read(BoxName.name));
|
||||
|
||||
@@ -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