简体   繁体   English

支付网关从支付堆栈向 flutter 客户的转账/取款请求

[英]payment gateway transfer/withdraw request from paystack to customers in flutter

I am making app where parents and students look up for tutors and hire them.我正在制作应用程序,家长和学生可以在其中寻找导师并雇用他们。 I have set different pricing for tutors.我为导师设定了不同的定价。 So when student/parent pay the teacher suppose 500 NGN.因此,当学生/家长向老师支付 500 NGN 时。 How am I gonna make the tutor to request the withdraw/ transfer of money from paystack to his account.我将如何让导师请求从支付堆栈中提取/转移资金到他的帐户。 For making payments i am using package here is my code where student/parent pay the teacher.对于付款,我使用的是 package 这是我的代码,学生/家长向老师付款。 I just want tutor to make the withdraw/transfer request from paystack.我只想让导师从paystack提出提款/转账请求。

..setSecretKey("SECRET-KEY")
      ..setAmount(int.parse(widget.price + '00'))
      ..setReference(DateTime.now().millisecondsSinceEpoch.toString())
      ..setCurrency("NGN")
      ..setEmail("hamsimirza1@gmail.com")
      ..setFirstName("Hammas")
      ..setLastName("Ali")
      ..setMetadata(
        {
          "custom_fields": [
            {
              "value": "snapTask",
              "display_name": "Payment to",
              "variable_name": "payment_to"
            }
          ]
        },
      )
      ..onSuccesful(_onPaymentSuccessful)
      ..onPending(_onPaymentPending)
      ..onFailed(_onPaymentFailed)
      ..onCancel(_onPaymentCancelled)
      ..initialize();

You can create a separate app for the teachers so that they can upload their banking details and request payment.您可以为教师创建一个单独的应用程序,以便他们可以上传他们的银行详细信息并请求付款。

Once the parent pays the fee you can update the wallet amount of the teacher (in your database).家长支付费用后,您可以更新老师的钱包金额(在您的数据库中)。 Whenever the teacher want payout you can use the bank details stored in the database and send API request or use their SDK to transfer the amount to the teachers bank A/C.每当老师想要付款时,您可以使用存储在数据库中的银行详细信息并发送 API 请求或使用他们的 SDK 将金额转移到教师银行 A/C。

Flowchart: Parents app流程图:家长应用在此处输入图像描述

Teachers app教师应用在此处输入图像描述

Note: Im not familiar with Paystack and im writing it in the assumtion it has provision to send money via API or SDK注意:我不熟悉 Paystack,我假设它可以通过 API 或 SDK 汇款

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM