braintree / braintree_java

Braintree Java library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
158 stars 99 forks source link

Verification Amount not being observed #96

Closed Stexxen closed 3 years ago

Stexxen commented 3 years ago

General information

Issue description

Creating a payment method using a nonce. The Java SDK submits the following

<payment-method>
    <customer-id>5758278927</customer-id>
    <options>
        <verifyCard>true</verifyCard>
        <verificationAmount>1.00</verificationAmount>
        <makeDefault>true</makeDefault>
    </options>
    <payment-method-nonce>nnnnnnnnnnnnn</payment-method-nonce>
    <customerId>5758278927</customerId>
    <paymentMethodNonce>nnnnnnnnnnnnnnn</paymentMethodNonce>
</payment-method>

to https://api.braintreegateway.com:443/merchants/xxxxxxxxx/payment_methods

This created the following method in the vault image

The verified amount is £0.00 whereas the SDK submitted 1.00, now I suspect this could be for 2 reasons.

  1. The format we set for the verificationAmount is incorrect, but the docs do not provide a schema for the value https://developers.braintreepayments.com/reference/request/payment-method/create/java#options.verification_amount should it be (1.00, £1.00, £1, 1, 100 etc...)?
  2. The tags within the options element are not converted to snake-case like all the other parameters are (customerId -> customer-id, paymentMethodNonce -> payment-method-nonce), This may not be the problem, but noticed this when trying to debug it.

If option 1 is the cause then it's a problem with the Docs and SDK parameter validation, if option 2 then its a problem with the SDK. So i've raised it with the SDk as there doesn't appear to be a repo for the docs? hope you don't mind....

hollabaq86 commented 3 years ago

👋 @Stexxen can you contact Support referencing this issue? They'll need your merchant ID and a link to this verification or payment method from your Control Panel to investigate the source of this issue.