#arden-malikb_code

1 messages ยท Page 1 of 1 (latest)

white urchinBOT
#

๐Ÿ‘‹ 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.

ancient nebulaBOT
#

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.

pliant girder
#

Please help me with my problem

crude sable
pliant girder
#

I need help

#

I have already discussed this

#

But the solution is not proper

#

SO i need better understanding about this

crude sable
#

What do you mean by that? Why is the solution not proper? You've already tried and it is not working?

pliant girder
#

Can I explain the whole scenario ?

#

How we are working and the flow of stripe ?

crude sable
#

Sure, please do!

pliant girder
#

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

crude sable
#

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.'?

pliant girder
#

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

pliant girder
crude sable
#

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.

pliant girder
#

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

crude sable
#

What is the issue exactly?

pliant girder
#

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

crude sable
#

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.

pliant girder
#

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

crude sable
#

After you create the payment method, are you asking how you would know that brand the customer selected for that payment method?

white urchinBOT
pliant girder
#

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.

primal marsh
#

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

pliant girder
primal marsh
#

That doesn't make sense

#

You are or are not using a raw pan flow?

pliant girder
#

I am using the stripe elements for the cardNumber CVV and Expiry date

pliant girder
primal marsh
#

Yeah you're just using the wrong terminology

#

That's not a custom integration

#

That's why I was confused

pliant girder
#

Sorry My bad

primal marsh
#

It's ok

pliant girder
#

Here is it

primal marsh
#

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

pliant girder
#

As i have set the showIcon as true automatically it will give the selection ?

pliant girder
#

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 ?

primal marsh
#

That allows the customer to select their preferred network for the card, yeah

pliant girder
#

?

primal marsh
#

Yes but I recommend you test out this flow fully in test mode so you have an understanding of how this works

pliant girder
primal marsh
#

You should just test on the same account you're going live on

#

But in our test mode

pliant girder
#

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

primal marsh
#

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

pliant girder
#

Ok sure

#

thanks

#

I really appreciate your work

#

You can close these chat now

#

Have a great day ๐Ÿ˜Š