-
Notifications
You must be signed in to change notification settings - Fork 61
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
[FK-1277] Add recurly integration example for sofort #100
base: main
Are you sure you want to change the base?
Conversation
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- <script src="https://js.recurly.com/v4/recurly.js"></script> --> | ||
<script src="https://js.lvh.me:8020/build/recurly.js"></script> |
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'll want to restore this to using the production recurly.js
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.
Definitely! Wanted to just get it up for now in case others wanted to use it to test out RJS changes as we make 'em
<!-- <script src="https://js.recurly.com/v4/recurly.js"></script> --> | ||
<script src="https://js.lvh.me:8020/build/recurly.js"></script> | ||
<script>window.recurlyConfig = { | ||
publicKey: 'qa2-p14FypnEc7sShkm9ESVPia' |
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.
Use <script src="/config"></script>
instead of hard coding this value. The /config
route will cover setting this variable for you.
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.
I was having trouble getting this to work previously, I'll have to play with it again!
|
||
<body> | ||
<h1>Bank Redirect</h1> | ||
<form onsubmit="return false;"> |
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.
Why isn't the form actually submitting to the backend?
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.
I actually took this as a base from @cyberxander90 and his ideal example. My guess is we don't actually want to be submitting a call to the backend directly, we want to call the bankRedirect.start
method that makes the call and outputs our redirect window in an iframe
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.
... but onsubmit could do that too? hmmm
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.
it could be both ways, we can call the start()
function on the submit
event, my first approach was avoid the submit to avoid reload the page.
@@ -15,6 +16,8 @@ <h1>Bank Redirect</h1> | |||
<div> | |||
Payment Method Type: | |||
<select id="payment_method_type" name="payment_method_type"> | |||
<option hidden disabled selected></option> |
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.
+1
Added recurly integration example for sofort specifically.