Re: Paypal In-context popup does not load content, then proceeds to full-page payment
Quote:
Originally Posted by
stellarweb
Cindy - that is definitely in the code of the jscript file on line 9
PHP Code:
paypal.checkout.setup('<?php echo MODULE_PAYMENT_PAYPALWPP_MERCHANTID; ?>', {
I also noticed that when it goes to a new window, it says I can't log in with my own merchant account - but I am not logged into my merchant account at PayPal... so don't know what that's all about! lol
Right, the code that's generating the error is that code on line 9; the paypal object doesn't exist, so the javascript call fails.
Re: Paypal In-context popup does not load content, then proceeds to full-page payment
Quote:
Originally Posted by
stellarweb
OK - that is above my pay grade! How do I change that? I am using CSS/JS loader to minimize the files - don't know if that has anything to do with it or not.
I'd start at your template's includes/templates/2016/common/html_header.php file and then, well, I assume that the plugin splits off from there possibly before hand. (I've actually somewhat avoided that plugin because of the odd things that it does to a site, but to each their own)... the default html_header.php looks in part like this with jquery loaded before venturing into each of the subsequent load folders:
Code:
/** CDN for jQuery core **/
?>
<script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="//code.jquery.com/jquery-1.12.0.min.js"%3E%3C/script%3E'));</script>
<script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"%3E%3C/script%3E'));</script>
<?php
/**
* load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
*/
$directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js');
while(list ($key, $value) = each($directory_array)) {
echo '<script type="text/javascript" src="' . $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
}
/**
* load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
*/
$directory_array = $template->get_template_part($page_directory, '/^jscript_/', '.js');
while(list ($key, $value) = each($directory_array)) {
echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n";
}
/**
* load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
*/
$directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php');
while(list ($key, $value) = each($directory_array)) {
/**
* include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
* These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
*/
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
}
/**
* include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
*/
$directory_array = $template->get_template_part($page_directory, '/^jscript_/');
while(list ($key, $value) = each($directory_array)) {
/**
* include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
* These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
*/
require($page_directory . '/' . $value); echo "\n";
}
Re: Paypal In-context popup does not load content, then proceeds to full-page payment
The solutions here do not work on my vanilla test shop, can someone post a link to a shop or demo that has this working please.
Re: Paypal In-context popup does not load content, then proceeds to full-page payment
Quote:
Originally Posted by
torvista
The solutions here do not work on my vanilla test shop, can someone post a link to a shop or demo that has this working please.
Ditto, I've tried a couple of things on a ZC1.5.5a test-site to no avail.
Re: Paypal In-context popup does not load content, then proceeds to full-page payment
I've spent a couple of hours fiddling with Paypals crappy demo and crappy documentation and checkng what it is doing and when before coming to the conclusion...it's complicated!
I don't have clear how the ZC form submission to ipn_handler joins hands with what the popup is expecting...and I need to get some real work done so can't waste all day on this.
Something seems broken in the zc core so some dev input would not go amiss...
Re: Paypal In-context popup does not load content, then proceeds to full-page payment
I've only just noticed that this works now, after having done precisely nothing to it since my last post...apart from keep ZC up to date.
Re: Paypal In-context popup does not load content, then proceeds to full-page payment
Quote:
Originally Posted by
torvista
I've only just noticed that this works now, after having done precisely nothing to it since my last post...apart from keep ZC up to date.
Fascinating :)
Thanks for the update.
Re: Paypal In-context popup does not load content, then proceeds to full-page payment
Just wondered if this perhaps works for UK stores? I have merchant ID filled and switched on context, but seems to be the same as before. Unless its a template clash with ajax / Javascript, am not sure.