12/12/1
This commit is contained in:
@@ -403,13 +403,24 @@ class PaymentController extends GetxController {
|
||||
payload: body,
|
||||
);
|
||||
final responseData = jsonDecode(response);
|
||||
print(responseData);
|
||||
// print(responseData);
|
||||
final accountId = responseData['id'];
|
||||
box.write(BoxName.accountIdStripeConnect, accountId);
|
||||
await updateCaptainAccountBank();
|
||||
print('accountId = $accountId');
|
||||
return accountId;
|
||||
}
|
||||
|
||||
Future updateCaptainAccountBank() async {
|
||||
var res = await CRUD().post(link: AppLink.updateAccountBank, payload: {
|
||||
'id': box.read(BoxName.driverID),
|
||||
'accountBank': box.read(BoxName.accountIdStripeConnect),
|
||||
});
|
||||
if (jsonDecode(res)['status'] == 'success') {
|
||||
Get.snackbar('Account Updated', '');
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> createTransactionToCaptain(
|
||||
String amount, String account) async {
|
||||
String url = 'https://api.stripe.com//v1/transfers';
|
||||
@@ -427,7 +438,7 @@ class PaymentController extends GetxController {
|
||||
final responseData = jsonDecode(response);
|
||||
print(responseData);
|
||||
final transactionId = responseData['id'];
|
||||
box.write(BoxName.accountIdStripeConnect, transactionId);
|
||||
|
||||
print('transactionId = $transactionId');
|
||||
return transactionId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user