Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

X-Payments Form not showing during checkout
 
Reply
   X-Cart forums > X-Payments > X-Payments issues & questions
 
Thread Tools
  #1  
Old 11-19-2014, 01:45 PM
 
deepblue_tiano deepblue_tiano is offline
 

Advanced Member
  
Join Date: Nov 2010
Posts: 50
 

Default X-Payments Form not showing during checkout

Hi, we upgraded our store to the latest version of x-cart 4.6.5 currently it was under development and we subscribe to x-payments to accept credit cards on our site.

The problem we encounter is during checkout the credit card form from x-payments doesn't show up. It was just loading (please wait), we have to refresh the page before the form to show up. Our development site is under sub-directory of our live site.

http://www.stanley-home-products.com/shp/

What seems to be the problem here?

I am suspecting SSL issues since certificate is not present at the subdirectory where our dev store is located.
__________________
christian
Reply With Quote
  #2  
Old 11-20-2014, 03:20 AM
  random's Avatar 
random random is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 79
 

Default Re: X-Payments Form not showing during checkout

Quote:
Originally Posted by deepblue_tiano
Hi, we upgraded our store to the latest version of x-cart 4.6.5 currently it was under development and we subscribe to x-payments to accept credit cards on our site.

The problem we encounter is during checkout the credit card form from x-payments doesn't show up. It was just loading (please wait), we have to refresh the page before the form to show up. Our development site is under sub-directory of our live site.

http://www.stanley-home-products.com/shp/

What seems to be the problem here?

I am suspecting SSL issues since certificate is not present at the subdirectory where our dev store is located.

This is seems to be a known issue related to a PayPal payment methods only. Please apply the attached patch file to fix this issue.

It doesn't look like an SSL issue (because you see a form after page reload). But if X-Payments iframe is not loaded at all it can be caused by invalid certificate. To avoid this just open the X-Payments admin in the same browser first and approve/ignore all precautions about certificate. After that iframe should work correctly. Of course this is only related to a development copy.
Attached Files
File Type: diff xp_opc_after_reg_fix.diff (785 Bytes, 4 views)
__________________
Sincerely yours,
Vladimir Petrov
Senior X-Payments Developer
Reply With Quote

The following user thanks random for this useful post:
anil420 (11-20-2014)
  #3  
Old 11-20-2014, 05:47 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,592
 

Default Re: X-Payments Form not showing during checkout

Vladimir this patch, and the original which I believe is part of some XP patch, have bug. Just the other day I had to fix one cart because of this patch - the func_paypal_adjust_payment_data function is undefined in this case

x_load('paypal');

needs to be added before that line
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #4  
Old 11-20-2014, 09:08 PM
  random's Avatar 
random random is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 79
 

Default Re: X-Payments Form not showing during checkout

Quote:
Originally Posted by cflsystems
Vladimir this patch, and the original which I believe is part of some XP patch, have bug. Just the other day I had to fix one cart because of this patch - the func_paypal_adjust_payment_data function is undefined in this case

x_load('paypal');

needs to be added before that line

The function "func_ajax_block_opc_payment()" we modify in this patch was added in X-Cart 4.6.0 and "x_load('paypal');" is already present here.
Earlier versions don't need this patch, so you may have been refering to some another issue. Generally, yes, if any custom code uses that function they should do "x_load('paypal');" prior calling it.
__________________
Sincerely yours,
Vladimir Petrov
Senior X-Payments Developer
Reply With Quote
  #5  
Old 11-20-2014, 10:50 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,592
 

Default Re: X-Payments Form not showing during checkout

Ok then this is again discrepancy between upgrades and actual stock cart code. XC 4.4.5

/modules/One_Page_Checkout/checkout.php
the code in the store file
PHP Code:
if (!empty($payment_methods)) {

    foreach (
$payment_methods as $k => $payment_data) {

        
$payment_data['payment_script_url'] = (($payment_data['protocol'] == 'https' || $HTTPS) ? $https_location $http_location) . '/payment/' $payment_data['payment_script'];

        if (
$payment_data['paymentid'] == $paymentid) {
            
$smarty->assign('payment_script_url'$payment_data['payment_script_url']);
            
$smarty->assign('payment_method',     $payment_data['payment_method']);
        }

        if (
$payment_data['processor_file'] == 'ps_paypal_pro.php') {
            
// Adjust cc_data and payment template for paypal
            
list($payment_data) = func_paypal_adjust_payment_data($payment_data'One_Page_Checkout');
        }

        
$payment_methods[$k] = $payment_data;
    }


the code in the latest stock 4.4.5 installation
PHP Code:
if (!empty($payment_methods)) {
     
x_load('paypal');

    foreach (
$payment_methods as $k => $payment_data) {

        
$payment_data['payment_script_url'] = (($payment_data['protocol'] == 'https' || $HTTPS) ? $https_location $http_location) . '/payment/' $payment_data['payment_script'];

        if (
$payment_data['paymentid'] == $paymentid) {
            
$smarty->assign('payment_script_url'$payment_data['payment_script_url']);
            
$smarty->assign('payment_method',     $payment_data['payment_method']);
        }

        if (
$payment_data['processor_file'] == 'ps_paypal_pro.php') {
            
// Adjust cc_data and payment template for paypal
            
list($payment_data) = func_paypal_adjust_payment_data($payment_data'One_Page_Checkout');
        }

        
$payment_methods[$k] = $payment_data;
    }

__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #6  
Old 11-20-2014, 10:54 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,592
 

Default Re: X-Payments Form not showing during checkout

You can see the missing x_load('paypal');
I am not sure how this had happen or the upgrade path for the store. It is just missing from there.
It is possible of course to be an upgrade mistake and not the files...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 11-21-2014, 01:06 PM
 
deepblue_tiano deepblue_tiano is offline
 

Advanced Member
  
Join Date: Nov 2010
Posts: 50
 

Default Re: X-Payments Form not showing during checkout

Quote:
Originally Posted by random
The function "func_ajax_block_opc_payment()" we modify in this patch was added in X-Cart 4.6.0 and "x_load('paypal');" is already present here.
Earlier versions don't need this patch, so you may have been refering to some another issue. Generally, yes, if any custom code uses that function they should do "x_load('paypal');" prior calling it.

We are using 4.6.5 version if that patch is present in 4.6.0 why is that bug appear on our site? The patch solve the problem. Thanks!
__________________
christian
Reply With Quote
  #8  
Old 11-22-2014, 03:27 PM
 
BrianY BrianY is offline
 

Advanced Member
  
Join Date: Nov 2011
Location: Georgia, USA
Posts: 74
 

Default Re: X-Payments Form not showing during checkout

Don't know if this helps, but I believe the patch Random offered here is fairly new because it is the same patch they gave me to fix the issue reported in a bug tracker (https://bt.x-cart.com/view.php?id=44112) ticket I created on November 18th.

Very glad to have this issue fixed. We have been trying to use the iFrame with X-Cart OPC many times over the years through many versions of X-Cart and always had to revert to using the separate page. Now it seems to be working. Note: We use PayPal Pro. Did not know it was special, but the patch does seem to deal specifically with PayPal Pro. Very pleased to finally be able to use the iFrame.
__________________
Brian
X-Cart 4.7.3
Reply With Quote

The following user thanks BrianY for this useful post:
ambal (11-22-2014)
  #9  
Old 11-22-2014, 10:47 PM
  ambal's Avatar 
ambal ambal is online now
 

X-Cart team
  
Join Date: Sep 2002
Posts: 4,104
 

Default Re: X-Payments Form not showing during checkout

Brian, yes the issue was PayPal-specific and the patch addressed it.
__________________
Sincerely yours,
Alex Mulin
VP of business development for X-Cart
X-Payments project manager

Last edited by ambal : 11-23-2014 at 10:11 PM.
Reply With Quote

The following user thanks ambal for this useful post:
BrianY (11-23-2014)
  #10  
Old 11-24-2014, 01:56 AM
  random's Avatar 
random random is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 79
 

Default Re: X-Payments Form not showing during checkout

Quote:
Originally Posted by deepblue_tiano
We are using 4.6.5 version if that patch is present in 4.6.0 why is that bug appear on our site? The patch solve the problem. Thanks!

I've only mentioned that the patch fixes a function, that was added in 4.6.0. So, that function (including the mentioned bug) still exists in 4.6.5 and will work properly out-of-the-box only in the next X-Cart releases.
__________________
Sincerely yours,
Vladimir Petrov
Senior X-Payments Developer
Reply With Quote
Reply
   X-Cart forums > X-Payments > X-Payments issues & questions


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:06 PM.

   

 
X-Cart forums © 2001-2018