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

QuickPay - Cancel URL does not update if website is moved #134

Open
Jemt opened this issue Feb 12, 2020 · 0 comments
Open

QuickPay - Cancel URL does not update if website is moved #134

Jemt opened this issue Feb 12, 2020 · 0 comments

Comments

@Jemt
Copy link
Owner

Jemt commented Feb 12, 2020

Payment Service Provider Interface's QuickPay module defines an option called Cancel URL:

image

Cancel URL is automatically written to data/PSPI/Config.php when webshop settings are updated:

image

This causes a minor problem if website is moved. If webshop settings are not updated using web interface (see image below), then Cancel URL will still point to the old website.

image

The work around is easy - simply hit Save in the settings section shown above after the website has been moved. The problem is, of course, that this is invisible to the user. There is no way to tell that this is the solution.

The best solution would be for SMShop to update Cancel URL before it is needed, or simply expose Cancel URL in the UI so the user can actually see it and change it. This does not prevent us from defining an initial value for the field.

Sitemagic CMS actually knows when a website has been moved, so it would be possible to invoke an event that extensions could subscribe to - perhaps via the existing extension life cycle. See code below.

image

Possible use case for an extension:

class SMShop extends SMExtension
{
    public function OnAppMoved($oldInfo, $newInfo)
    {
    }
}
@Jemt Jemt added the minor bug label Feb 12, 2020
@Jemt Jemt added this to the SMCMS-JSShop milestone Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant