#dhara-android
1 messages · Page 1 of 1 (latest)
hi there. Can you give more context like a request ID (https://support.stripe.com/questions/finding-the-id-for-an-api-request) or the PaymentIntent ID pi_xxx or the exact function you called in the SDK when you got that error?
can you share the information I asked for? I'm afraid we need specific details like that.
ConfirmPaymentIntentParams confirmParams = ConfirmPaymentIntentParams
.createWithPaymentMethodCreateParams(params3, paymentIntentClientSecret);
stripe.confirmPayment(this, confirmParams);
List<Object> paymentMethodTypes =
new ArrayList<>();
paymentMethodTypes.add("card");
Map<String, Object> params = new HashMap<>();
params.put("amount", 2000);
params.put("currency", "gbp");
params.put("stripe_token_id",stripe_token);
params.put("description","dhara rabadiya");
params.put("type","text");
params.put("enabled",true);
params.put("email","hello@yopmail.com");
params.put(
"payment_method_types",
paymentMethodTypes
);
Log.e("sdhcbsc"," "+params);
RequestBody body = RequestBody.create(params.toString(), mediaType);
Request request = new Request.Builder()
.url(BACKEND_URL + "create-payment-intent")
.post(body)
.build();
httpClient.newCall(request)
.enqueue(new PayCallback(this));
// Hook up the pay button to the card widget and stripe instance
Button payButton = findViewById(R.id.checkout);
payButton.setOnClickListener((View view) -> {
PaymentMethodCreateParams params3 = AddPayment.cardMultilineWidget.getPaymentMethodCreateParams();
if (params3 != null) {
ConfirmPaymentIntentParams confirmParams = ConfirmPaymentIntentParams
.createWithPaymentMethodCreateParams(params3, paymentIntentClientSecret);
stripe.confirmPayment(this, confirmParams);
}
});
}
this is full code
thanks! do you have a request ID (https://support.stripe.com/questions/finding-the-id-for-an-api-request) or the PaymentIntent ID pi_xxx so I can look at your logs a little?
no
can you get one please?
ok
req_8E8VyQ5flw5HPu
ok, so this is from your backend code, your PHP server(which you did not share the code for).
the easy fix is to find that code and simply remove the line 'save_payment_method' => true (and replace it with setup_future_usage => "off_session", if overall you want Stripe to save the card used in the payment).
so this is the error from backend?
yes
I assume you followed some old guide or something, save_payment_method is an old and deprecated parameter, you should just get rid of it.
can you please send me latect doc link
because backend developer is said
that is working
i need to found if there is any error from my code then how can i found?
just tell them to make the change I said. It will fix it.
they dont agree with to remove this line
they told me that it is working they alreay tested
ok! well then you will keep having this error until you change it.
but i cant found some of the methods like
Customer.create
for android stripe version 19.1.1
yes, those are backend functions.
they're not something you call in your frontend(the Android app), so that's quite normal.
ok
how can i found client_secret in android
because i cant found code for android
for this thing
the client_secret is something your backend creates and send to your app.
you don't have one currently because your backend is failing to create the PaymentIntent, because it needs to make the change I told you to make.
any other option without any changes in backend side?