Razorpay:如何在仪表板上更新客户订单ID?

时间:2019-04-16 10:31:59

标签: java android razorpay

enter image description here

请参考图片。我正在为android创建一个razorpay请求,并按照文档(https://razorpay.com/docs/checkout/android/)进行操作,我成功地使用以下方式提供了金额,电子邮件,联系人,货币以及razorpay订单ID(来自razorpay order / api)下面的代码。

public void callRazorPay(String email, String orderContact, String razorPayOrderId, String elavitraOrderId) {
    Log.d(TAG, "callRazorPay: "+total+"  "+razorPayOrderId+"  "+ elavitraOrderId);


    /*
      You need to pass current activity in order to let Razorpay create CheckoutActivity
     */
        final Activity activity = this;

        final Checkout co = new Checkout();

        try {
            JSONObject options = new JSONObject();
            options.put("name", "Razorpay Corp");
            options.put("description", "Order 17881");
            //You can omit the image option to fetch the image from dashboard
            options.put("image", "https://s3.amazonaws.com/rzp-mobile/images/rzp.png");
            options.put("currency", "INR");
            options.put("amount", Integer.valueOf(100));
            options.put("order_id", razorPayOrderId);

            JSONObject preFill = new JSONObject();
            preFill.put("email", email);
            preFill.put("contact", orderContact);

            options.put("prefill", preFill);

            co.open(activity, options);
        } catch (Exception e) {
            Toast.makeText(activity, "Error in payment: " + e.getMessage(), Toast.LENGTH_SHORT)
                    .show();
            Log.d(TAG, "callRazorPay: "+e.toString());
        }
    }

但是不能输入的是客户订单ID(请参见图像中空白的订单ID列),该ID在客户的服务器上生成,应显示在razorpay仪表板上以进行订单识别。有人可以帮我把什么键放入选项对象中,以便“订单ID”列不为空吗?

0 个答案:

没有答案