feat: Phase 1 — remove Stripe, switch to e-Transfer
- Drop stripe_payment + stripe_sdk deps; delete stripe pay pages/widgets - New ETransferPay widget: shows payment@wisetronic.com + R#<orderId> remark - goPayment stripe/native branches now route to e-Transfer - pay_now widgets: strip saved-cards section & dead nativePay logic - my_cards pages rewritten as e-Transfer info (route kept) - models/utils/constants cleaned of stripe; env constraint -> Dart 3 See UPGRADE_NOTES.md. (Null-safety migration is Phase 3; deps upgrade Phase 2.)
This commit is contained in:
@@ -291,39 +291,6 @@ class Utils {
|
||||
return amount.toStringAsFixed(decimalPlace);
|
||||
}
|
||||
|
||||
static void createOrUpdateStripePaymentMethod(
|
||||
String paymentMethodId,
|
||||
String cardBrand,
|
||||
String paymentMethodType,
|
||||
String cardCountry,
|
||||
int cardExpMonth,
|
||||
int cardExpYear,
|
||||
String cardFunding,
|
||||
String cardLast4,
|
||||
) {
|
||||
HttpUtil.httpPost(
|
||||
'v1/create-update-stripe-payment-method',
|
||||
(response) {
|
||||
if (response.statusCode == 200) {
|
||||
print(
|
||||
'create or update customer stripe payment method success. ${response.data}');
|
||||
}
|
||||
},
|
||||
body: {
|
||||
'payment_method_id': paymentMethodId,
|
||||
'card_brand': cardBrand,
|
||||
'payment_method_type': paymentMethodType,
|
||||
'card_country': cardCountry,
|
||||
'card_exp_month': cardExpMonth,
|
||||
'card_exp_year': cardExpYear,
|
||||
'card_funding': cardFunding,
|
||||
'card_last4': cardLast4,
|
||||
},
|
||||
isFormData: true,
|
||||
).catchError((error) {
|
||||
print('Error: ${error}');
|
||||
});
|
||||
}
|
||||
|
||||
static showSubmitDialog(BuildContext context) {
|
||||
showDialog(
|
||||
@@ -900,48 +867,7 @@ class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
static void stripePaymentIntent(Order order, String customerId, String paymentMethodId, String cardType,
|
||||
OnSuccess onSuccess, OnError onError,
|
||||
{
|
||||
String cardBrand,
|
||||
String cardCountry,
|
||||
int cardExpMonth,
|
||||
int cardExpYear,
|
||||
String cardFunding,
|
||||
String cardLast4,
|
||||
}) {
|
||||
|
||||
HttpUtil.httpPost('v1/stripe-payment-intent',
|
||||
onSuccess,
|
||||
body: {
|
||||
'order_id': order.id,
|
||||
'pay_amount': order.totalPrice,
|
||||
'customer_id': customerId == null ? '' : customerId,
|
||||
'payment_method_id': paymentMethodId,
|
||||
'payment_method_type': cardType,
|
||||
'card_brand': cardBrand,
|
||||
'card_country': cardCountry,
|
||||
'card_exp_month': cardExpMonth,
|
||||
'card_exp_year': cardExpYear,
|
||||
'card_funding': cardFunding,
|
||||
'card_last4': cardLast4,
|
||||
},
|
||||
isFormData: true,
|
||||
).catchError(onError);
|
||||
}
|
||||
|
||||
static void stripeChargedSuccess(Order order, String paymentMethodId,
|
||||
String paymentIntentId, OnSuccess onSuccess, OnError onError) {
|
||||
HttpUtil.httpPost('v1/stripe-charged-success',
|
||||
onSuccess,
|
||||
isFormData: true,
|
||||
body: {
|
||||
'order_id': order.id,
|
||||
'payment_method_id': paymentMethodId,
|
||||
'payment_intent_id': paymentIntentId,
|
||||
}
|
||||
).catchError(onError);
|
||||
}
|
||||
|
||||
static int getProductLineInOrder(CartInfo cartInfo) {
|
||||
int qty = 0;
|
||||
|
||||
Reference in New Issue
Block a user