gpt4 book ai didi

android - Citrus 支付网关 Android 集成

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:15:11 24 4
gpt4 key购买 nike

我必须将 Citrus 支付网关集成到我的 Android 应用程序中,我们将不胜感激。 website here提前谢谢你。

最佳答案

Citrus 提供了一些真正简化的开发人员指南,以实现高效的技术集成。让我们来看看示例网上银行集成。可以在 The Citrus Developer's Guide 上找到剩余的步骤。 .

  1. Secret Key
  2. Access Key
  3. SignIn Key
  4. SignIn Secret
  5. SignUp Key
  6. SignUp Secret
  • 从 - Example 和 Citruslibrary 下载套件。将 Citruslibrary 添加为 Example 的依赖项。来自 Github。

    git 克隆 https://github.com/citruspay/open-android-v2.git

  • 查看 init 函数。您可以使用 citrus config 设置 key 。

    private void init() 
    {
    Config citrus = new Config();
    citrus.setEnv("sandbox"); //replace it with production when you are ready
    citrus.setupSignupId("merchant-signup");
    citrus.setupSignupSecret("3e2288d3a1a3f59ef6f93373884d2ca1");
    citrus.setSigninId("merchant-wallet");
    citrus.setSigninSecret("c40798d3c12114b5bb19f2051d9ed181");
    }
  • 从您的服务器获取账单。收集用户详细信息。调用收费 API。

       private void cardpay(String bill_string) 
    {
    Bill bill = new Bill(bill_string);
    Card card = new Card("4111111111111111", "11", "21", "000", "Tony Stark", "debit");
    UserDetails userDetails = new UserDetails(customer);
    PG paymentgateway = new PG(card, bill, userDetails);
    paymentgateway.charge(new Callback()
    {
    @Override
    public void onTaskexecuted(String success, String error)
    {
    processresponse(success, error);
    }
    }
    });
    }
  • Netbanking 话费

     private void bankpay(String bill_string)
    {
    Bill bill = new Bill(bill_string);
    Bank netbank = new Bank("CID002");
    UserDetails userDetails = new UserDetails(customer);
    PG paymentgateway = new PG(netbank, bill, userDetails);
    paymentgateway.charge(new Callback()
    {
    @Override
    public void onTaskexecuted(String success, String error)
    {
    processresponse(success, error);
    }
    });
    }

关于android - Citrus 支付网关 Android 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21111545/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com