mece request / payment economics
This commit is contained in:
@@ -13,7 +13,6 @@ import 'package:pshared/utils/payment/fx_helpers.dart';
|
||||
|
||||
import 'package:pweb/models/payment/multiple_payouts/csv_row.dart';
|
||||
|
||||
|
||||
class MultipleIntentBuilder {
|
||||
static const String _currency = 'RUB';
|
||||
|
||||
@@ -36,33 +35,27 @@ class MultipleIntentBuilder {
|
||||
);
|
||||
|
||||
return rows
|
||||
.map(
|
||||
(row) {
|
||||
final amount = Money(amount: row.amount, currency: _currency);
|
||||
return PaymentIntent(
|
||||
kind: PaymentKind.payout,
|
||||
source: ManagedWalletPaymentMethod(
|
||||
managedWalletRef: sourceWallet.id,
|
||||
asset: sourceAsset,
|
||||
),
|
||||
destination: CardPaymentMethod(
|
||||
pan: row.pan,
|
||||
firstName: row.firstName,
|
||||
lastName: row.lastName,
|
||||
expMonth: row.expMonth,
|
||||
expYear: row.expYear,
|
||||
),
|
||||
amount: amount,
|
||||
feeTreatment: FeeTreatment.addToSource,
|
||||
settlementMode: SettlementMode.fixReceived,
|
||||
settlementCurrency: FxIntentHelper.resolveSettlementCurrency(
|
||||
amount: amount,
|
||||
fx: fxIntent,
|
||||
),
|
||||
fx: fxIntent,
|
||||
);
|
||||
},
|
||||
)
|
||||
.map((row) {
|
||||
final amount = Money(amount: row.amount, currency: _currency);
|
||||
return PaymentIntent(
|
||||
kind: PaymentKind.payout,
|
||||
source: ManagedWalletPaymentMethod(
|
||||
managedWalletRef: sourceWallet.id,
|
||||
asset: sourceAsset,
|
||||
),
|
||||
destination: CardPaymentMethod(
|
||||
pan: row.pan,
|
||||
firstName: row.firstName,
|
||||
lastName: row.lastName,
|
||||
expMonth: row.expMonth,
|
||||
expYear: row.expYear,
|
||||
),
|
||||
amount: amount,
|
||||
feeTreatment: FeeTreatment.addToSource,
|
||||
settlementMode: SettlementMode.fixReceived,
|
||||
fx: fxIntent,
|
||||
);
|
||||
})
|
||||
.toList(growable: false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user