X-Payments:Troubleshooting

From Qualiteam Help

Jump to: navigation, search

Contents

Troubleshooting

X-Payments 1.x installation process fails on a Windows server

If X-Payments 1.x installation fails on a Windows server, try replacing the following line from install.php:

define('XP_DIR', rtrim(realpath(dirname(__FILE__)), XP_DS) . XP_DS);

with this line:

define('XP_DIR', rtrim(dirname(__FILE__), XP_DS) . XP_DS);

Warning: require_once(/home/user/public_html/xpayments/lib/PDO.php)

I am trying to install the X-Payments module but receive the following error on step 2 of the installation process:

Warning: require_once(/home/user/public_html/xpayments/lib/PDO.php) [function.require-once]: failed to open stream: No such file or directory in /home/user/public_html/xpayments/top.inc.PHP53.php on line 84

Fatal error: require_once() [function.require]: Failed opening required '/home/user/public_html/xpayments/lib/PDO.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/xpayments/top.inc.PHP53.php on line 84


Solution:

It looks like the problem is related to the current PHP configuration on your server.

PHP is currently compiled with the necessary extensions:

'--enable-pdo=shared' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared'

However, X-Payments requires a bit different type of PHP configuration. PDO extension, as well as the MySQL PDO driver, needs to be installed as a shared module. In other words your php.ini file needs to be updated so that the PDO extensions will be loaded automatically when PHP runs:

extension=php_pdo.so extension=php_pdo_mysql.so

See also:

Please share this info with your server administrator and ask them to make the necessary changes in your PHP configuration.

cron.php: X-Payments is using a non-secure protocol error

I have tried everything to get the x payments cron.php working, but it is not working and we are getting this error:

ERROR [2012-25-06 12:23:01] User: unknown; IP: unknown Zone: Core Code: NONSECURE_PROTOCOL (237) X-Payments is using a non-secure protocol

Affected systems: Core/Defender.php file (60:assert); Application.php file (133:check); /home/user/public_html/xpayments/cron.php file (26:run)

Solution:

Wrong PHP binary is used to run cron.php script. You need to run cron.php using so called "CLI" version of PHP. Ask your hosting administrator to tell where PHP CLI is located on your server and configure cron to run cron.php script using PHP CLI version.


Duplicate charges

X-Payments v1.0.5 may have this issue under certain circumstances (iFrame checkout option aka "Lite interface" is enabled). Reason is that customers don't see an obvious sign that their payment is being processed after they entered their details and clicked "Submit" button so they click once again. This may create duplicate charges with some payment processors supported by X-Payments.

Solution:

Apply below patches to

1) front-end templates of your X-Payments:

File:Xp.105.diff

2) X-Cart connector:

File:Xc.454.diff


See how to apply patches at X-Cart:To apply a patch manually

Note: You do not need to apply the above patches if your X-Payments version is not v1.0.5 and if you do not use iFrame checkout provided by X-Payments.

Empty or 404 page at Magento admin back-end

If you see empty or 404 page at System -> Configuration -> X-Payments connector after installation do the following:

1) Clear cache: System -> Cache Management

2) Logout and login admin area again

3) Then go to System -> Permissions -> Roles and click on "Administrators", then in a popup/new window click "Save Role". That's it.

My store background image does not carry over to X-Payments checkout area template

Solution:

Make sure if the background image parameter in your X-Payments checkout skin is set as direct URL to your store image.

X-Payments checkout skin CSS file includes the following class used to display the header of integrated store pages:

  1. header .line1 .logo {

background: url("../../skin/artistictunes_car_tires/css/../images/custom/top_image1.jpg") no-repeat scroll left top #000000; height: 240px; margin-left: 0; padding-top: 0; position: relative; width: auto; }

For example, one of the possible solutions - modify the code of the generated CSS file, and change the default background image URL:

"../../skin/artistictunes_car_tires/css/../images/custom/top_image1.jpg"

to e.g. this one:

"https://yourshopdomain.com/xcart/skin/artistictunes_car_tires/images/custom/top_image1.jpg"

X-Payments error (code: 843): Unallowed target

This type of error may appear in X-Cart versions prior to 4.5.0. You see below error message and X-Payments log file entry when using "Test connection" and "Request payment methods" buttons:

Error message:

- X-Payments error (code: 843): Unallowed target - ""

X-Payments log file entry:

-----------------------------------
ERROR [2013-11-05 00:11:49]
User: shopping cart (%%%%%%%%%%%); IP: %%%%%%%%%%%%
Zone: Model
Code: TARGET_UNALLOWED (843)
Unallowed target - ""
-----------------------------------

Solution:

Check if you have correct charset code specified in "Charset" field on X-Cart admin back-end -> Content -> Languages -> Your store language page. See how to manage languages in X-Cart [| here].


Sage Pay - Reason: 4020 : Information received from an Invalid IP address

This is caused by a wrong IP for callbacks set in your Sage Pay account.

If you are using X-Payments Hosted plan (Basic, PRO or Multistore) you need to add the IP address of 98.142.211.162 in your SagePay merchant backend on the Settings -> Valid IPs page.

If you are using a downloadable X-Payments license - you need to enter IP address of the server where your X-Payments copy is deployed. See this article to understand X-Payments callbacks.

No credit card form displayed when a customer pays

Error message at checkout instead of credit card form

You've made a change in credit card form template at X-Payments side and now your checkout doesn't work?

This is the most probable situation with such type of errors during checkout via X-Payments. You've made a change in X-Payments credit card form and forgot to approve it at X-Payments admin back-end. As result X-Payments cannot process credit cards as it sees some changes in templates, but they are not approved by you, i.e. the admin user. Such approval process is implemented in X-Payments for security reasons. See also X-Payments:User_manual#Customizing_the_Interface

Solution:

Go into admin back-end dashboard and log in as the main admin user and check if it displays a warning about "Payment interface files have been modified" like below File:Warning_customer_interface_changed.png

If yes, click "Approve" link in the warning text and everything is set now.

CyberSource Internal Error

Do you use CyberSource and get "Internal Error" on the checkout page along with below error within the X-Payments error log?

ERROR [2012-13-12 17:27:17]
User: unknown; IP: 68.184.224.121
Zone: Transport
Code: FILE_NOT_ACCESSIBLE (109)
File "Path/to/the/cybersource/security/key/txt/file" does not exist or is not readable

Solution:

Make sure you specified the right **server** path to the Cybersource key file on the "CyberSource SOAP toolkit API" configuration page, and it is readable by HTTP daemon on your X-Payments server.

You use Hosted X-Payments plans and run out of bandwidth

Congratulations! Your amount of transactions is impressive indeed! Most likely you used all bandwidth we provide for X-Payments Hosted accounts.

Solution:

Please contact us using your HelpDesk account regarding the issue and we will consult you how to increase your bandwidth. Also, you should consider either upgrading to larger X-Payments Hosted plan or using X-Payments downloadable license that you can host yourself.

You use Hosted X-Payments plans and run out of disk space

One more reason for Hosted X-Payments plans can be you've run out of disk space we provide with every plan - check X-Payments folder at your X-Payments Hosted account (see X-Payments:X-Payments-Hosted-FAQ).

Solution:

Download logs files from your X-Payments Hosted account (see X-Payments:FAQ#Where_can_I_find_X-Payments_logs.3F) and remove them at X-Payments server to clear up some space.

Your integrated shopping cart does not pass all customer profile fields to X-Payments correctly

E.g. in X-Cart you can configure some vital for X-Payments customer profile fields (e.g. zipcode, address, email) as optional and your customers can miss them and do not fill in them with data during checkout. Thus X-Cart passes empty values for those data fields and X-Payments fails to process a transaction. X-Payments connector usually shows below warning

File:Warning_profile_fields_XP_connector.png


Solution:

Either make such customer profile fields mandatory for checkout in your cart or customize your cart connector for X-Payments to pass non-empty values if they should not be mandatory for your checkout routine and customers can leave such profile fields empty.

PayPal PRO integration does not work in X-Cart 4.x

You followed X-Cart:Adding_and_enabling_PayPal_payment_methods_in_X-Cart and X-Payments:Configuring_PayPal_payment_modules_in_X-Payments, made sure all configuration settings are set correctly, but PayPal PRO still does not work for you and you see "Internal error" message when you use X-Payments in iFrame mode or see "Internal error (The merchantEmail is missing or incorrect)" error message when X-Payments is configured as a separate page in your X-Cart checkout routine.

Solution:

PayPal module in X-Cart v4.x refers to "orders department email address" at General settings/Company options/Company emails section. You need to have a valid email address in that setting to fix the issue.

There are connection problems between your shopping cart and X-Payments at the time when a customer pays

Your cart cannot connect to X-Payments some times and your customers see "Internal error" displayed.

Solution:

Make sure your cart server can connect to X-Payments server at all times (especially during your site high load times of a day).

"Callback to online store is failed" notification and now all credit card transactions are failing

You receive below notifications from X-Payments

"Callback to online store is failed. This notification has been sent by X-Payments installation at 'www.mysite.com'"

and now all credit card transactions are failing and the credit card fields for secure checkout on your website are missing.


Solution:

Most likely you regenerated encryption codes in X-Payments but neglected to update the information in X-Cart, hence the credit card fields are not loading when the customer is attempting to use a credit card for payment.

To remedy this go into X-Payments, copy the new encryption codes and paste them into X-Cart in the appropriate fields (Payment Methods → Credit Card → X-Payments connector module settings, see how to configure X-Cart Connector).

Fatal error: Access to undeclared static property: XPay_Model_Base_Module::$this

You started to see error messages like below instead of working X-Payments.

Fatal error: Access to undeclared static property: XPay_Model_Base_Module::$this in /xxxxxxxxxxx/lib/XPay/Model/Base/Module.php on line 153
or
Fatal error: Access to undeclared static property: XPay_Model_Base_Module::$this in /xxxxxxxxxxx/lib/XPay/Model/Base/Module.php on line 131

Solution:

It is due to updating PHP to v 5.4.

To fix the problem, in lines 131 and 153 of

<xpayments_dir>/lib/XPay/Model/Base/Module.php

change

self::$this->

to

$this->

My X-Payments doesn't store customers credit cards/X-Payments subscriptions module doesn't work

So "Store credit card" functionality or X-Payments Subscriptions module doesn't work in your shopping cart despite of you integrated it with X-Payments?

Solution:

  1. Make sure you use X-Payments v2.x because X-Payments v1.x doesn't support this functionality.
  2. Make sure you use a payment gateway that supports so called "tokenization" in X-Payments v2.x - see the list of such payment gateways at X-Payments:User_manual#Appendix_A._Supported_payment_gateways . They have "+" in "Tokenization" column. "-" means tokenization is not supported for a payment gateway.
  3. So you do use X-Payments v2.x and a payment gateway that supports tokenization in X-Payments? Please make sure tokenization functionality is enabled for your payment gateway account at payment gateway side. Sometimes payment gateways call it differently, e.g. "vault", "Transformer", etc. If you are not sure - contact your payment gateway to enable tokenization for your payment gateway.


Customer CC expires in 2022 - X-Payments stops at 2020

We just had a customer call in. He could not check out because our X-Payments payment page would not allow him to enter the expiration year of 2022 for his credit card. Our X-Payments only goes up to 2020.


Solution:

You need to change YEAR_RANGE from 7 to 10 for example in file lib/XPay/View/Payment/Main.php

// Years list range

const YEAR_RANGE = 7

White screen or HTTP 500 Internal server error instead of admin dashboard

You see white screen after logging in X-Payments admin dashboard.

Solution:

Some PHP packages contain a bug that causes "White screen" or HTTP 500 Internal server error when PHP operates with the database via PDO. If you experience such issue contact your hosting support referring to:

https://bugs.php.net/bug.php?id=60825 https://bugs.php.net/bug.php?id=53716

Magento: cannot test module connection or payment methods cannot be imported

You copied all configuration data from X-Payments properly but in Magento admin you see below message when you click "Test module" button Test transaction failed. Please check the X-Payment Connector settings and try again. If all options is ok review your X-Payments settings and make sure you have properly defined shopping cart properties.

Or a message that payment methods cannot be imported when you click "Request payment methods" button.

Solution:

Possible reason - you do not have a valid SSL certificate installed for your X-Payments. Self-signed SSL cannot pass libCurl validation and thus prevent connection between Magento and X-Payments, too. You need to install a valid SSL certificate at X-Payments server.

NOTE: users of our hosted X-Payments plans are safe since we provide SSL by default.



This article can be downloaded as a PDF file
Personal tools
entry points
x-cart on social