-
-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete Stripe 3D Secure Integration #158
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is lit. You can leave the console logs since it will help us test it, but can you make some other changes/provide explanations where requested?
//console.log(req.user); | ||
try { | ||
response = await orderService.stripePaymentInstant(req.body.checkoutId, req.user); | ||
console.log(response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the console log here.
user_email: userObj.email | ||
}, | ||
description: "Swaas Order " + checkoutId.substr(checkoutId.length - 6), // Last six chars of id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what "Swaas Order" is? It seems like it is specific to a product. If it is a product name, maybe we can move it out to config so that it is reusable.
this.$emit('pay', data.token); | ||
// const data = await Stripe.createToken(); | ||
// this.$emit('pay', data.token); | ||
event.target.disabled = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of directly accessing event.target.disabled
, can you utilize the complete
variable or create one more variable to handle this logic and pass it as a disabled
prop in the <b-btn>
component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually a quick fix to disabling a button. Perhaps, you could merge this PR into a new branch where the both of us could colab on such changes.
}, | ||
}); | ||
if (data && data.httpStatus === 200) { | ||
console.log(data.responseData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all these console logs if you dont mind
if (confirmPayment.paymentIntent.status == 'succeeded') { | ||
console.log('inside confirmPayment status', confirmPayment); | ||
if (confirmPayment.hasOwnProperty('error')) { | ||
this.$notify({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go into this error condition, shouldn't we return from the function at the end? Or displaying the error and then making ProxyUrl.stripeInstantPayment
call the desired behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need not return a function. I've tested various Stripe errors with this implementation and I've had no issues with the current error handling.
Also, please let us know if you guys are using Veniqa for your business. We'd be happy to feature you on our official website. |
Hey @smaharj1, the console logs were put there for testing purposes while I was building the platform. However, I'll get rid of the console logs for this PR. As far as "Swaas Order", that is basically what would print on your card statement. You could change that to anything you'd like. |
Can you remove the Swaas in that case so that it is generic? |
Absolutely. |
Sorry guys, been a little occupied lately, so couldn't get around to this. And yes, we would love contributions in any way, including the UI. We've wanted to support some additional design layouts in the list of options for home page "featured sections". And definitely, the admin panel could use some work in responsiveness across devices. Anything particular you got in mind that you wanted to work on? |
How come this hasn't been merged yet? I've tested this and the code works just fine. |
What is this doing?
Integrates Stripe 3D secure with the Payment Intents API. This pull request also includes code that handles errors in making/completing payments and notifies the user about the same.
To test it, simply put in your Stripe secret and public key and use one of the 3D secure cards from https://stripe.com/docs/testing
This URL also includes cards which will intentionally fail a payment. Use those to see how the errors are handled.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe how it impacts the application:
The PR fulfills these requirements:
develop
branch, not themaster
branchFix #xxx[,#xxx]
, where "xxx" is the issue number)Other information: