-1

I am developing an eshop website based on Nuxt.js (Vue) for the frontend and Laravel for the backend.

I am at the stage where the payment is being done and thinking what my options are.

My payments provider offers two options: Redirect and Native.

The first option basically redirects the user from my spa to the payments provider page to fill in their card details and perform the transaction. Afterwards it redirects back to a predefined page. This option although it is really common (pretty much every company uses it) it also has the disadvantage that the spa loses its state.

The second option is to have a form inside my spa that sends the information to my api which finally performs the request to the payment provider and completes the transaction.

I believe the second option is the best in terms of ux but I am mostly writing this question to ask for your thoughts on this mostly related to law terms and security in general.

Note that I won't store any card details in the second case but even then, can this process be a bad thing for my company?

mauxtin
  • 388
  • 2
  • 5
  • 15
  • Have you tried to use stripe checkout popup? This case you'll not loose the spa state and will not process card details by yourself. – Kasheftin Feb 26 '19 at 16:52
  • My provider does support a similar service but with jquery (which I want to avoid ofc) – mauxtin Feb 26 '19 at 18:35
  • If you have some service written with jquery, you can always use it's source code and write your own solution. Open the popup, load the provider's site page there, provide redirect_url pointing back to your system special page that triggers parent window action on load, and that's all. It should not be very hard. – Kasheftin Feb 26 '19 at 20:11
  • If I understood correctly, you are suggesting to open the payment's provider payment url in an iframe modal, let them pay there and as soon as the payment is completed, close the modal? – mauxtin Feb 27 '19 at 09:03

1 Answers1

1

Quick disclosure: I'm new to stackoverflow and don't have the points to add comments.

Are you currently integrated with Braintree? The Drop-in UI is an excellent way to complete a transaction in a Single Page Application without worrying about page re-directs.

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact Braintree Support.

  • How does this answers the question ? Can you please add more details. – Manoj Choudhari Feb 26 '19 at 19:30
  • Hey there, do you offer Marketplace solutions for European countries? Last time I checked it was just for the USA I believe. – mauxtin Feb 27 '19 at 08:53
  • Hi, welcome to stackoverflow. Next time consider adding this as a comment and not as an answer – Oscar Sortland Kolsrud Feb 27 '19 at 09:08
  • 1
    It appears he can't leave a comment yet since SO requires you to have a certain level. This appears to be why this was listed as an answer and not a comment. In most cases SO questions really need to be directed to the specific processor since they need to look at the account rather than try to solve over SO. The answer to contact support is the best answer sometimes for a SO thread. – bbusby Mar 12 '19 at 18:07