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

Redirect Url does not work #38

Open
BarnaTB opened this issue Jul 10, 2020 · 2 comments
Open

Redirect Url does not work #38

BarnaTB opened this issue Jul 10, 2020 · 2 comments

Comments

@BarnaTB
Copy link

BarnaTB commented Jul 10, 2020

I have added the redirect_url to the config like this;

const redirectUrl = window.location.path + WATCH + '/' + singleEvent.event.sessionId + '/' + singleEvent.event.sessionToken;

const config = {
                                    PBFPubKey: process.env.REACT_APP_RAVE_PUBLIC_KEY,
                                    customer_email: this.props.auth.user.email,
                                    customer_phone: '',
                                    amount: singleEvent.event.eventPrice,
                                    currency: 'UGX',
                                    redirectUrl: redirectUrl,
                                    txref: singleEvent.id,
                                    production: true,
                                    payment_options: [
                                        'card',
                                        'mpesa',
                                        'mobilemoneyghana',
                                        'mobilemoneyuganda',
                                        'mobilemoneyrwanda',
                                        'mobilemoneyzambia',
                                        'mobilemoneytanzania',
                                        'barter'],
                                    onSuccess: () => {},
                                    onClose: () => console.log('Closed this transaction!!!'),
                                }

When I run the payment, it succeeds but it doesn't redirect to that page, which is what the user is paying to access.

Any help? I'm using class components.

@samson-ayeni-deel
Copy link

@BarnaTB
Copy link
Author

BarnaTB commented Jul 11, 2020

@segun-paystack Thanks for your response. I've changed that to redirect_url but it still doesn't redirect. Anything that I could be doing wrong?

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

2 participants