Skrill's confusing behaviour (inconsistency between payment methods)

Started by loppan, December 28, 2015, 21:57:45 PM

Previous topic - Next topic

loppan

Hello,

since many of our customers are from the UK, I would like to offer this payment method on our site. However, I do find the behaviour of this plugin rather strange.

When I checkout with Paypal Express - or any other payment method I've tried - it goes like this :

1. Customer view cart & selects payment method and click the big blue "Confirm Purchase" button
2. Customer is sent away to Paypal to finish the payment
3. Customer is returned to the "Thank you for your Order!" page (order_done.php), the order is confirmed and the customer receives an e-mail.

In my experience, the checkout landing page (order_done.php in this case) is a very important page and it's a good idea to inform the customer about delivery times etc here, perhaps also promote some social media pages and so on :).

However, when a customer checks out with Skrill, it seems to break this pattern. After customer selects "Skrill" and click "Confirm Purchase", the customer actually immediately sees the checkout landing page, please see the attached screenshot.

Not only is this not very visually appealing on my site, it also prevents me from using the checkout landing page the way I want it, and IMHO, this inconsistency between the different plugins is rather confusing to the customer... (To add even more confusion - a logout form was shown right under the Skrill "window" (is it an iframe?), but I commented out this piece of code before taking the screenshot :))

Are there any specific reason why this plugin is doing this? If not, does anybody have any ideas on how to perhaps hack this plugin so that it behaves more like Paypal? I could not find any settings for it anywhere...

Would love to discuss this :) Cheers!

Peter

GJC Web Design

yes.. in skrill the plgVmConfirmedOrder() is just sending the login iframe to the confirmed page

$html = '<html><head><title></title><script type="text/javascript">
                jQuery(document).ready(function () {
                    jQuery(\'#main h3\').css("display", "none");
                });
                </script></head><body>';
$html .= '<iframe src="https://' . $this->_getSKRILLURL ($method) .
'/app/payment.pl?sid=' . $sid . '" scrolling="yes" style="x-overflow: none;"
                frameborder="0" height="' . (string)$height . 'px" width="650px"></iframe>';


but this is e.g. exactly the same as standard paypal .. except in its case this page then has a redirect to paypal - I have no experience of paypal express but on any payment plugins i have built I use the same method..

maybe loose the iframe and redirect to skrill would be more logical?

where do u land after a successful payment?

that html is formed in

function _getPaymentResponseHtml ($paymentTable, $payment_name) {
VmConfig::loadJLang('com_virtuemart');

$html = '<table>' . "\n";
$html .= $this->getHtmlRow ('COM_VIRTUEMART_PAYMENT_NAME', $payment_name);
if (!empty($paymentTable)) {
$html .= $this->getHtmlRow ('SKRILL_ORDER_NUMBER', $paymentTable->order_number);
}
$html .= '</table>' . "\n";

return $html;
}


you could add code there

Quotea logout form was shown right under the Skrill "window"

this is handled here I assume->

$height = $method->hide_login ? 720 : 500;
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

loppan

Cheers John & thanks for taking your time as always :).

Quote from: GJC Web Design on December 28, 2015, 22:50:12 PM
maybe loose the iframe and redirect to skrill would be more logical?

where do u land after a successful payment?

Yes, skipping the iframe and redirect to skrill - instead of redirect to my checkout landing page would, according to me be much more logical :).

However, maybe this is the reason why this plugin was designed this way in the first place - I'm not sure if Skrill is "clever" enough to redirect back to my store after a successful payment. But I don't know - Skrill does not feature a "sandbox mode" or test accounts. Or well... I read somewhere that they can convert two regular accounts to "test accounts" for 48 hours on request, and this is something they do manually. But since they haven't replied to any of the e-mails I've sent them later, I'm not so sure this would run so smooth :D. And once they manage to convert my accounts I only have 48 hours to test - which might not conveniently fit with my schedule at that time :D.

Oh well... I should probably learn more about Skrill before digging into code changes in this plugin anyways, I'll post an update once I got it :).

Best wishes

Peter

GJC Web Design

QuoteYes, skipping the iframe and redirect to skrill - instead of redirect to my checkout landing page would, according to me be much more logical .

have a look in the paypal standard helper  to see how this is done.. it is just a JS redirect.. this wouldn't need to be tested as sandbox etc.. just see if it works and gets u to the login screen..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

misholini

Hi,
I am not good with the code, please tell me how do I strip the iframe so that users are redirected directly to Skrill gateway after order confirm. (I don't want the gateway loading in iframe within the Thank you page).
Thanks in advance.



Quote from: GJC Web Design on December 28, 2015, 22:50:12 PM
yes.. in skrill the plgVmConfirmedOrder() is just sending the login iframe to the confirmed page

$html = '<html><head><title></title><script type="text/javascript">
                jQuery(document).ready(function () {
                    jQuery(\'#main h3\').css("display", "none");
                });
                </script></head><body>';
$html .= '<iframe src="https://' . $this->_getSKRILLURL ($method) .
'/app/payment.pl?sid=' . $sid . '" scrolling="yes" style="x-overflow: none;"
                frameborder="0" height="' . (string)$height . 'px" width="650px"></iframe>';


but this is e.g. exactly the same as standard paypal .. except in its case this page then has a redirect to paypal - I have no experience of paypal express but on any payment plugins i have built I use the same method..

maybe loose the iframe and redirect to skrill would be more logical?

where do u land after a successful payment?

that html is formed in

function _getPaymentResponseHtml ($paymentTable, $payment_name) {
VmConfig::loadJLang('com_virtuemart');

$html = '<table>' . "\n";
$html .= $this->getHtmlRow ('COM_VIRTUEMART_PAYMENT_NAME', $payment_name);
if (!empty($paymentTable)) {
$html .= $this->getHtmlRow ('SKRILL_ORDER_NUMBER', $paymentTable->order_number);
}
$html .= '</table>' . "\n";

return $html;
}


you could add code there

Quotea logout form was shown right under the Skrill "window"

this is handled here I assume->

$height = $method->hide_login ? 720 : 500;