#arden-malikb_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1276168467430637654
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- arden-malikb_code, 3 hours ago, 88 messages
Please help me with my problem
Hi, you can set a prefererred network here: https://docs.stripe.com/co-badged-cards-compliance?type=web-elements&ui=card-element#selecting-a-default-network
Your code would look something like the following:
const cardElement = elements.create('card', {
hideIcon: false,
preferredNetwork: ['cartes_bancaires', 'visa', 'mastercard'],
});
I need help
I have already discussed this
But the solution is not proper
SO i need better understanding about this
What do you mean by that? Why is the solution not proper? You've already tried and it is not working?
Sure, please do!
Yes please give me a moment so that I can explain it properly
Thanks
I am a developer, We have implemented stripe in our project, And we have implemented Custom in our project.
So the below code is that we are creating the cardNumber, CVV and Expiry date like this.
this.cardNumberElement = elements.create('cardNumber', {
showIcon: true,
style: elementStyles,
});
this.cardNumberElement.mount('#card-number');
var cardExpiryElement = elements.create('cardExpiry', {
style: elementStyles,
});
cardExpiryElement.mount('#card-expiry');
var cardCvcElement = elements.create('cardCvc', {
style: elementStyles,
});
cardCvcElement.mount('#card-cvc');
Now As I can see that stripe as added new thing that is Networks (which is Co-badged cards compliance) which i need to implement it in my project.
Now by my understanding and reffereing the documentation I get to know that the available networks cam be get by the card number. If there are available networks then it will show and the user has to select it to deduct the payment from the preferred network selection.
From the front-end side we are calling the Payment_Method API and from that we get the Id and after gettng the ID we are passing it to the backend and they are calling the Payment_Intent API.
Here I cannot get the card number as per the policy, so What i have done is that In the paymnet_method API when I get the response in that i can get the available networks.
Getting that networks I am showing it in the dropdown by which the user can select.
Now I dont know in which API i need to send it so that the payment can be deducted as per the Network selection.
So please give me the solution that Can we send it in the Payment_Intent method so that it can be deducted or any other solution.
The below is the code when we call the Payment_Method API
submit() {
var scope = this;
this.purchaseBtnProcessing.emit(true);
if (!this.stripePaymentMethodId) {
this.stripe.createPaymentMethod('card', this.cardNumberElement).then(function(result) {
if (result.error) {
scope.purchaseBtnProcessing.emit(false);
scope.toasterService.error(result.error.message);
} else {
if (
result &&
result.paymentMethod &&
result.paymentMethod.card &&
result.paymentMethod.card.networks &&
result.paymentMethod.card.networks.available &&
result.paymentMethod.card.networks.available.length > 0
) {
scope.stripePaymentMethodId = result.paymentMethod.id;
scope.populateCardNetworksDropdown(result.paymentMethod.card.networks.available);
scope.purchaseBtnProcessing.emit(false);
return;
} else {
const obj = {
id: result.paymentMethod.id,
stripePreferredNetwork: '',
};
scope.sendStripe.emit(obj);
}
}
});
} else {
const obj = {
id: this.stripePaymentMethodId,
stripePreferredNetwork: this.preferredNetwork,
};
this.sendStripe.emit(obj);
}
}
I hope this finds you well with better understanding what i am facing through
What does 'Now I dont know in which API i need to send it so that the payment can be deducted as per the Network selection.'?
We document that you need to dispaly this: https://docs.stripe.com/co-badged-cards-compliance?type=checkout-payment-links#integration-requirements as you are collecting the card details
I mean that the user has select any network then I need to know that in which API i need to send that Preferred selected network so that the payment can be deducted from the preferred network selection
As per the rules we arent collecting the card number because it is confidential and as per my code I cannot get the card number
You are using Stripe.js, and there is when you collect the payment method. When you present the Card Element to collect the card details.
The networks I am getting is from the Payment_Method API Wait let me send the screen shot of what i get from the API response
I have added the testing card which is 5555 5525 0000 1001 which has these 2 availabe networks
What is the issue exactly?
Sir, I have already gave you the scenario
Let me let you you understand once again
Here first tell me how can I retrive the available networks ?
second if the user selects the network in which Stripe API I need to send the Preferred Network ?
Please do not close this conversation as I need to implement it on Urgent basis.
I need a proper resolution on my issue, I hope you will help me for the same
Hmm, maybe there is a misunderstanding here. Once the end customer adds card that supports co-branding, Stripe.js surfaces the options to the customer without any brand preferences. To select a default network to show the end customer, you can pass in networks from most to least preferred using the preferredNetwork option when creating the Card Element. You do not need to know the selection of the customer, it is what you want to show as your preferred network.
No this is not I need sir.
As I can see that in the custom Implementation we have to retrieve the Available networks and let the user select the network
I want to know that How can I show the user that these are the available networks you have to select
and then if the user selects the network In which API from stripe we need to send so that stripe can deduct the amount from the preferred network selection
After you create the payment method, are you asking how you would know that brand the customer selected for that payment method?
In the payment method I am getting the available networks which I am showing, now if the user selects any network therefore, in which stripe Api I need to send so that it can be deducted from the selected network.
Hi my colleague needs to step away. Looking
You are using a custom integration without stripe elements?
Am a bit confused because you keep saying custom integration
But you have code above that uses our elements
In https://docs.stripe.com/co-badged-cards-compliance custom integration refers to integration without elements
I am using custom integration with stripe elements
I am using the stripe elements for the cardNumber CVV and Expiry date
I didnt get this
Yeah you're just using the wrong terminology
That's not a custom integration
That's why I was confused
Sorry My bad
It's ok
Here is it
This is handled automatically by the card number element as long as you set showIcon true (which it looks like you do)
This should also be handled automatically
As i have set the showIcon as true automatically it will give the selection ?
Then rest it will automatically happen
?
Thank you for the solution @primal marsh
I Hope only setting the showIcon as True will complete my task as per the new Co-badged cards compliance
Is that true ?
That allows the customer to select their preferred network for the card, yeah
And whatever the user will select the payment will be deducted
?
Yes but I recommend you test out this flow fully in test mode so you have an understanding of how this works
Actually I have created one stripe account for the test purpose but after that it is asking about the identification to use the payments even in the test mode
Our project is about the event planning
and in the manager panel side anyone can create the domain after getting the memebership
and can add their stripe account
and the account we have in live for our testing purpose is of US
athat is why I am unable to test it and stuck in this task
Oh ok. You should be able to create a test account in Eur to test this. If you are having issues, then recommend asking our support team why it doesn't let you use test mode: https://support.stripe.com/contact
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.