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

Feature request: ability to set different return and cancel urls #13

Open
RytisPasaravicius opened this issue Nov 13, 2019 · 5 comments
Labels
enhancement help wanted protocol changes Label for any protocol changes made by provider
Milestone

Comments

@RytisPasaravicius
Copy link

Expected Behavior

Return and cancel url should not be same, at least there should be option to change it

Actual Behavior

Request url is used as RETURN and CANCEL

Steps to Reproduce the Problem

  1. Just add one more parameter for cancel url to IPizza.php __contruct() method
@renekorss
Copy link
Owner

Can you elaborate why this would be necessary? You can check if return was successful with $response->wasSuccessful() and redirect if necessary.

Of course this can be done, but would be breaking change. If you can provide real use case for this, I can implement this.

@renekorss renekorss added the protocol changes Label for any protocol changes made by provider label Nov 13, 2019
@RytisPasaravicius
Copy link
Author

i could do this, but it would be much easier to have that parameter, get rid of one redirect. Maybe it is not worth of it, but it would be nice. Just sharing my opinion :)

@renekorss
Copy link
Owner

Sharing opinions is always welcomed. Thanks!

I just thought that it has some certain case where you can't use this library at all if that's not implemented.
I will mark this issue as help needed and milestone to v4.0 since this is breaking change. We can implement this then.

@renekorss renekorss added this to the v4.0 milestone Nov 13, 2019
@renekorss renekorss changed the title return and cancel urls Feature request: ability to set different return and cancel urls Nov 13, 2019
@renekorss
Copy link
Owner

Actually, I came up with workaround for you if you still want different URLs. Since you can override request data, you can also override VK_CANCEL. See README and Wiki. Example:

$request = $bankInstance->getPaymentRequest(123453, 150, 'Example payment', 'EST', 'EUR', [
    'VK_CANCEL' => 'https://my.custom.cancel.url'
]);

@RytisPasaravicius
Copy link
Author

Thanks, i will try :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted protocol changes Label for any protocol changes made by provider
Projects
None yet
Development

No branches or pull requests

2 participants