Stripe integration - Payment Intent with checkout redirection - javascript

I am working on to upgrade the checkout process to make it SCA complaint. As per their doc I need to use the PaymentIntents for it.
And I did follow the steps mentioned in their document: https://stripe.com/docs/payments/payment-intents/web
Now I was able to configure it properly but in this document it mentioned to have stripe-card-element. But I need to use the checkout redirection process instead of this card element.
Need to use this :
https://stripe.com/docs/payments/checkout/migration
If somebody know please share some info.
FYI, I already reached their customer support but they are taking way too long to respond and I am in hurry.

If you are using updated Stripe Checkout (that does the redirect for you), you do not need to create PaymentIntents manually. Checkout uses PaymentIntents under the hood and will automatically do that for you.
It looks like what you want is the client-server Checkout integration: https://stripe.com/docs/payments/checkout/one-time#client-server
i.e. create a Checkout Session server-side, then use Stripe.js and redirectToCheckout to redirect to the Checkout page using the session ID.
There is also a client-only integration that you could leverage: https://stripe.com/docs/payments/checkout/one-time#client-only

Related

Save PayPal with Vault Payment Javascript implementation

I have successfully implemented a checkout while saving payment to vault. But now I am attempting to simply save a payment to vault without checkout and am following this tutorial
https://developer.paypal.com/beta/vault/purchase-later/paypal/
But on this page there is nothing about the Javascript that needs to be used and I can't quite work out how to implement this.
Has anyone successfully implemented this and how was it accomplished?

How to test auth0 login with github using cypress

I'm trying to write E2E tests for my UI. In order to login, I'm using auth0 with social login - Github.
I have tried several ways to get access token for Github:
Using cypress button clicking:
cy.visit("https://myapp.io/login");
cy.get('.auth0-lock-social-button-text').click();
// Redirect me into Github login page.
cy.get('#login_field').type(my_username);
cy.get('#password').type(my_password);
cy.get('.btn').click();
output: url: https://github.com/session
page content: Cookies must be enabled to use GitHub.
Login with cy.request
This is where I'm stuck. I want to mock the flow of the ui by sending the requests by myself, but I'm not sure how to do it. All the examples I found were with users they manually created in auth0 users manager, and they received the data by passing client_secret and some other params. Thats not what I'm looking for. I'm trying to illustrate the flow as a user see it, or at least the requests that happens behind.
Is someone have example that explains how to do it?
Note: I don't want to use cypress-social-logins because I need it to pass CI.
Thanks.

How do I set up a PayPal checkout

I'm wanting to set up a PayPal checkout button so my customers can buy goods using PayPal.
I want a solution that relies on the server and it just the client side.
I have been to the PayPal website and I have found all kinds of methods to enable the setting up of the API but I don't know which one to choose and the site does not explain much so I'm hopping you could tell me which method I should use to set it up?
Thanks
If you need a Checkout button, one of these demo patterns should get you started
Option #1: No server-side code needed.
Option #2: Requires server-side code for payment setup and capture.

Ember PAge restriction

how to restrict user from accessing page like profile,change password in URL before login session begin for user
example : localhost/profile is access able even though user is not looggd in. how do i restrict it
Official guide has a good explanation about your case. You can check out the following page; you can make use of willTransition, beforeModel and similar hooks provided from route as described.
First I'd like to note that all security must be implemented on server side first, because client side (ember app in this case) is very vulnerable.
As for your question, I recommend to use ember-simple-auth addon. It does exactly what you need.

php + js checkout and thank you page

i am build a stripe checkout for my ecommerce on my current project.
everything working good, but i have few question which is confuse me.
is good idea to use ajax for checkout?
i am using stripe.js to checkout, when customer click on checkout button, which will get the token from strips, and then i use ajax to submit the token to php, php will charge the customer, and do the rest of job. is this safe? do i have to use all php code on page to checkout?
i am also using localstorage to store the shipping cart information, is localstorage safe than cookie? if not, is cookie enough for shopping cart information?
about thank you page.
i already create a thank you page, but this page every user can go to this page, like customer didn't buy anything still can go this page. www.example.com/checkout/thankyou.php
for stander checkout thank you page, should i create something to prevent non checkout user to view this page? or i just make thank you page and checkout into one page? like when customer click checkout button, ajax return 1, then popout a modal, show order number, and redirect to other page in 5 sec.
Yes, this is safe, since the Stripe's token is a reference to their system and cannot be used or read by anyone else but your PHP script, using the private API key.
This token is created to ensure no credit card info ends on an unprotected server.
But as they say in their tutorial, you should enable HTTPS to protect the other transaction values of your customer.
They have a real effective tech support that you can reach on https://webchat.freenode.net/ using the #stripe channel.
And about the thank you page... You could use a $_session variable to prevent the access from users who didn't succeded a charge.

Categories

Resources