如何在paypal沙箱中获取发票号码

时间:2016-08-17 04:55:40

标签: android android-studio paypal paypal-sandbox

我正在使用paypal sdk并尝试获取发票号作为回应,我可以获得自定义,但无法获取发票号,

..............................

"transactions": [
        {
            "amount": {
                "total": "88.72",
                "currency": "AUD",
                "details": {
                    "subtotal": "88.72"
                }
            },
            "description": "Order Total",
            "custom": "287947",
            "item_list": {
                "items": [],
                "shipping_address": {
                    "recipient_name": "aKUs"
                }
            },

............................

JAVA

private PayPalPayment getStuffToBuy(String paymentIntent) {
        //--- include an item list, payment amount details
        PayPalItem[] items =
            {
                    new PayPalItem("Order Total", 1, new BigDecimal(gradtotal), "AUD",
                            orderid),

            };
        BigDecimal subtotal = PayPalItem.getItemTotal(items);
       // BigDecimal shipping = new BigDecimal("7.21");
      //  BigDecimal tax = new BigDecimal("4.67");
       // PayPalPaymentDetails paymentDetails = new PayPalPaymentDetails(shipping, subtotal, tax);
        BigDecimal amount = subtotal;
        PayPalPayment payment = new PayPalPayment(amount, "AUD", "Order Total", paymentIntent);

        payment.custom(userids);
        payment.invoiceNumber(orderid);
        //payment.items(items).paymentDetails(paymentDetails);

        //--- set other optional fields like invoice_number, custom field, and soft_descriptor
       // payment.custom("This is text that will be associated with the payment that the app can use.");

        return payment;
    }

0 个答案:

没有答案
相关问题