Skip to content

Redirect Url does not work #38

Description

@BarnaTB

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions