#asp

1 messages · Page 1 of 1 (latest)

inner plaza
olive ledge
#

We need card Exp month year and CVV validation documentation

#

@inner plaza

inner plaza
#

what do you mean exactly?

olive ledge
#

iOS platform save card payment process with CVV validation documentation

#

@inner plaza

inner plaza
#

I answered that question on Monday I think?

#

@olive ledge hmm, it seems like the documentation for that has disappeared, I think it got lost when some documentation was updated.

Anyway, I think the way it works is you build an input in your app to collect the CVC, then pass it to the SDK :
https://stripe.dev/stripe-ios/docs/Extensions/STPAPIClient.html#/s:10StripeCore12STPAPIClientC0A0E11createToken12forCVCUpdate10completionySS_yAD8STPTokenCSg_s5Error_pSgtcSgtF

//

https://stripe.dev/stripe-android/payments-core/com.stripe.android/create-cvc-update-token.html

and then you can use that in a call to confirm a PaymentIntent. (you pass the id of the Token object to
payment_method_options.card.cvc

https://stripe.dev/stripe-ios/docs/Classes/STPConfirmCardOptions.html#/c:@M@Stripe@objc(cs)STPConfirmCardOptions(py)cvc

//

https://stripe.dev/stripe-android/payments-core/com.stripe.android.model/-payment-method-options-params/index.html#-1800276983%2FClasslikes%2F-1622557690

olive ledge
#

I used same but its not working @inner plaza
Payment process is completed without validating cvv

inner plaza
#

oh actually

#

Payment process is completed without validating cvv
can you elaborate? Do you have an example of the payment and what you see in technical terms(like the API response etc) that seems wrong or not validated?

olive ledge
#

I used live save card entered wrong cvv number but payment is completed. without any error message. what can i do. is this cvv validation backend api work or front end side work?

#

@inner plaza

inner plaza
#

you can't test in livemode, that's not allowed and not representative of actual customer behaviour.

olive ledge
#

Okay thanks
new PaymentMethodOptionsParams.Card(cvc)
Whats the purpose of adding this line using this code android java @inner plaza

#

Hi @inner plaza

inner plaza
#

the purpose is that is how you pass the CVC value that you have recollected from the customer so we can process the payment with that value available.

olive ledge
#

PaymentMethodOptionsParams.Card(cvc)
I used this line showed below error

error: no suitable constructor found for Card(String)
new PaymentMethodOptionsParams.Card(cvc)

But without added this line payment process completed.
@inner plaza

inner plaza
#

what version of stripe-android is your app using as a dependency?

olive ledge
#

implementation "com.stripe:stripeterminal:1.0.17"
implementation 'com.stripe:stripe-android:17.0.0'

#

@inner plaza

inner plaza
#

ah ok

#

I think the docs are wrong unfortunately!

#

try new PaymentMethodOptionsParams.Card(cvc, null) instead

olive ledge
#

Okay thanks i will check it
is it validating for cvv?

inner plaza
#

what does that mean?

olive ledge
#

error: incompatible types: Card cannot be converted to String
new PaymentMethodOptionsParams.Card(cvc, null)

#

i Found this error.

inner plaza
#

can you share the complete code?

olive ledge
#

Okay sure

private void confirmPaymentIntent(String scmid, String sc_clientSecret,String cvc) {

    final ConfirmPaymentIntentParams params =
            ConfirmPaymentIntentParams.createWithPaymentMethodId(
                    scmid,//'{{PAYMENT_METHOD_ID}}'
                    sc_clientSecret,
                    null,
                    null,
                    new PaymentMethodOptionsParams.Card(cvc, null))
                    //  new PaymentMethodOptionsParams.Card(cvc)
            );
    stripe.confirmPayment(Payment_Settings_Activity.this, params);
    Log.e("sc_params", "" + params);
}
#

Please check it

inner plaza
#

it's just

                        scmid,//'{{PAYMENT_METHOD_ID}}'
                        sc_clientSecret,
                        null,
                        new PaymentMethodOptionsParams.Card(cvc, null))
                );
#

you don't need the second null I think the docs are wrong

olive ledge
#

Its working fine.
This codes
is it validating CVV?

#

Thanks.

#

@inner plaza

inner plaza
#

it passes the CVC to the API yes, so we can submit it to the bank when processing the payment

inner plaza
# olive ledge Thanks.

no worries — unfortunately the docs have some mistakes here that I need to follow up on internally

olive ledge
#

stripe.createCvcUpdateToken(sc_card_cvv, new CvcUpdateResultCallback()); in android java code

Whats the purpose of this line

#

@inner plaza

inner plaza
#

it's how you create a CVC token.

#

the idea is you collect the raw value from the user, create a token in Stripe with that code, and you pass the ID of the Token to the API when submitting a payment.

olive ledge
#

Thanks for your support everything very useful for us 😍 ♥️ ♥️

#

@inner plaza

inner plaza
#

happy to help