We have a multistore environment (3 stores), and downloaded this free plugin https://www.nopcommerce.com/p/2421/gestpay-payment-plugin.aspx
It works fine except the BancaSella's payment page "Return to store" button redirects to the principal store's homepage (domain name). How can the plugin be changed to redirect to the currently used store, possibly where the user left off, like PayPal?
UPDATE: I phoned BancaSella. The technical guy in their support center told me they require you to purchase a separate codice esercente for each domain. Using the GestPay backoffice you can then configure the respective URLs for ACK, NAK and Server2Server response.
But companies like to save money so I tried modifying the Nop.Plugin.Payments.GestPay plugin, file PaymentGestPayController.cs, public ActionResult EsitoGestPay. I initially tried to use the activeScope to get the SiteUrl to redirect to but it was always returning SiteId=1 (root site). Instead my workaround uses the order to retrieve the current user's store:
1) //__________ Redirect Multistore __________// if (order.StoreId > 1) return Redirect(string.Format("{0}/checkout/completed/{1}", _storeService.GetStoreById(order.StoreId).Url, order.Id.ToString())); just before ACK:
//__________ Ordine Completato __________// return RedirectToRoute("CheckoutCompleted", new { orderId = order.Id });