首页 > 解决方案 > 使用 Braintree Drop-inAndroid sdk 向 Paypal 结帐流程添加额外信息

问题描述

是否可以在结帐页面显示购物车中的商品列表和总金额?我使用braintree dropin 我遵循了文档This my code so far to build the dropin request, unlickely 我没有看到任何必需的额外信息

    val billingAddress = ThreeDSecurePostalAddress()
        .givenName("Antonio")
        .surname("Ianniello")
        .phoneNumber("341908570")
        .streetAddress("")
        .extendedAddress("")
        .locality("Italy")
        .region("IT")
        .postalCode("80038")
        .countryCodeAlpha2("EU")


    val additionalInformation = ThreeDSecureAdditionalInformation()
        .accountId("account-id")


    val threeDSecureRequest = ThreeDSecureRequest()
        .amount("100.00")
        .versionRequested(ThreeDSecureRequest.VERSION_2)
        .email("a.ianny@paypal.com")
        .mobilePhoneNumber("341908570")
        .billingAddress(billingAddress)
        .additionalInformation(additionalInformation)


    var paypalRequest = PayPalRequest()
        .displayName(PlaceDetailsActivity.selectedBeach.tenantName)
        .currencyCode("EUR")
        .lineItems(
            listOf<PayPalLineItem>(
                PayPalLineItem(
                    PayPalLineItem.KIND_DEBIT,
                    "Past",
                    "1",
                    "20"
                )
            )
        )


    val dropInRequest = DropInRequest()
        .paypalRequest(paypalRequest)
        .collectDeviceData(true)
        .requestThreeDSecureVerification(true)
        .threeDSecureRequest(threeDSecureRequest)
        .clientToken(clientToken)

非常感谢你的帮助!

标签: androidkotlinsdkbraintree

解决方案


Drop-In UI 是一种仅用于收集付款信息的表单,它不收集特定于结帐的字段。

要通过 Drop-In 集成为 3D Secure 2 提供建议的其他信息,您需要创建自己的表单以从用户那里收集此信息,然后将该数据添加到 ThreeDSecurerequest 对象

如需更多信息,请联系Braintree 支持


推荐阅读