Skip to content
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

How to use rxp-js in react? #35

Open
ArvindMaurya1996 opened this issue Sep 30, 2020 · 4 comments
Open

How to use rxp-js in react? #35

ArvindMaurya1996 opened this issue Sep 30, 2020 · 4 comments

Comments

@ArvindMaurya1996
Copy link

I have used rxp-js.js using jquery and that works fine.
but i need to understand how does it work in REACT js?

i have been struggling around and went through all the documentation but did not got the break through.
any help or guidance is really appreciated.

@marcfielding1
Copy link

marcfielding1 commented Nov 4, 2020

So I'm just about to do this, this is where I'm at - as a useEffect() of the component you'd want...

fetch("your_url_to_return_sha1_hash",  (jsonFromServerSdk) => {
                RealexHpp.embedded.init(
                    "payButtonId",
                    "targetIframe",
                    "https://dev.rlxcarts.com/mobileSDKsV2/response.php", // not sure this is right for us as we're on elavon.
                    jsonFromServerSdk
                );
                document.getElementByTag('body')[0].addClass('loaded');
            });

I think just testing it out now! Would be good to have a response from the team though.

@AminDaryan
Copy link

So I'm just about to do this, this is where I'm at - as a useEffect() of the component you'd want...

fetch("your_url_to_return_sha1_hash",  (jsonFromServerSdk) => {
                RealexHpp.embedded.init(
                    "payButtonId",
                    "targetIframe",
                    "https://dev.rlxcarts.com/mobileSDKsV2/response.php", // not sure this is right for us as we're on elavon.
                    jsonFromServerSdk
                );
                document.getElementByTag('body')[0].addClass('loaded');
            });

I think just testing it out now! Would be good to have a response from the team though.

So Have you figured it out? No clue how to use this.

@marcfielding1
Copy link

Heya sorry for the slow reply,yep lemmy find an example for you.

@TobyHodkinson2022
Copy link

Is there any further progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants