News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

LinkPoint Error: Failure in Processing the Payment (ps_linkpoint)

Started by FireIslandMan, March 11, 2006, 16:15:00 PM

Previous topic - Next topic

FireIslandMan

Can anyone using LinkPoint succesfully please help me out? I'm testing VM without an SSL certificate for now to see if it can process credit cards using LinkPoint. I downloaded the 'lphp.php' file from LinkPoint (http://www.linkpoint.com/viewcart/down_index.htm) and installed it in the /administrator/components/com_virtuemart/classes/payment/ dir next to ps_linkpoint.php. Then I got my pem file from linkpoint (https://www.linkpointcentral.com/) and uploaded it per:
http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=13808.0

I maunually added the payment method and Fixed the bug in Task# 520 for line 197 file in /classes/payment/ps_linkpoint.php as instructed:
http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=15194.0

Now trying to test a credit card order using the 4111111111111111 test number and get the following ERROR:

Notice: Unknown column 'id' in 'where clause' in /VirtueMart/includes/database.php on line 282

/VirtueMart/includes/database.php:473
/VirtueMart/administrator/components/com_virtuemart/classes/ps_database.php:98
/VirtueMart/administrator/components/com_virtuemart/classes/payment/ps_linkpoint.php:197
/VirtueMart/administrator/components/com_virtuemart/classes/ps_checkout.php:792
/VirtueMart/administrator/components/com_virtuemart/classes/ps_checkout.php:491
/VirtueMart/components/com_virtuemart/virtuemart_parser.php(244) : eval()'d code:1
/VirtueMart/components/com_virtuemart/virtuemart_parser.php:244
/VirtueMart/components/com_virtuemart/virtuemart.php:29
/VirtueMart/index.php:212

Error: <
Error: Failure in Processing the Payment (ps_linkpoint)

Did I miss something or do something wrong?  ???
Can anyone using LinkPoint succesfully please help me out here? Thanks.

Soeren

Hello,
just change line 197 in the file /classes/payment/ps_linkpoint.php

FROM
        $qt = "SELECT * FROM `#__{vm}_userinfo` WHERE id='".$auth["user_id"]."' AND address_type='BT'";

TO
        $qt = "SELECT * FROM `#__{vm}_user_info` WHERE user_id='".$auth["user_id"]."' AND address_type='BT'";

this should at least fix the query error.

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

FireIslandMan

Many Thanks Soeren!

I changed line 197 in the file /classes/payment/ps_linkpoint.php as instructed and it did fix the query error. Unfortunately I'm still getting this:

Error: <

Error: Failure in Processing the Payment (ps_linkpoint)

Soeren

I am NOT the author of this code.

Please see the file header:

/**
* The ps_linkpoint class, containing the payment processing code
* for transactions with linkpoint.net or yourpay.com
* contains code for Recurring billing an/or PreAuth Options
*
* Installation:  You must have the linkpoint/yourpay.com API  file (lphp.php) in the
* current working directory, or your php includes directory.
* you also should have your public key file provided by linkpoint/yourpay.com secured
* in a directory outside of the webroot, but readable by the webserver daemon owner (ie; nobody)
*
* In the administrator console of VirtueMart -> Payment Method List -> Creditcard LP -> Configuration
* you can insert your store number, and public key location.
*
* Any questions, email jimmy@freshstation.org
* @copyright (C) 2005 James McMillan
*/


Maybe you should contact the author...

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

FireIslandMan

Thank you for all your help and suggestions Soeren.

I emailed James McMillan, the author of the ps_linkpoint.php code and he kindly replied with the FIX!  So now it works as advertised ;D

On line 280 (or so) of ps_linkpoint.php please change the following:

if ($result["r_approved"] != "SUBMITTED")

TO

if ($result["r_approved"] != "APPROVED")

lonelywaves

Quote from: FireIslandMan on March 22, 2006, 04:48:31 AM
Thank you for all your help and suggestions Soeren.

I emailed James McMillan, the author of the ps_linkpoint.php code and he kindly replied with the FIX!  So now it works as advertised ;D

On line 280 (or so) of ps_linkpoint.php please change the following:

if ($result["r_approved"] != "SUBMITTED")

TO

if ($result["r_approved"] != "APPROVED")


Hi,
I worked according to the instructions in these posts but still I am getting error. Can you please let me how you managed to integrate Linkpoint with your application?

Regards,
Fenil

FireIslandMan

What version of VM using and what does your error message say?

lonelywaves

Hi,
Thanx for the reply. I am using VM 1.0.4. When I click on confirm order button I get error message like

Error: <

Error: Failure in Processing the Payment (ps_linkpoint)

Regards,
Fenil

FireIslandMan

First make sure that in Payment Method List --> Credit Card --> General you have:

Active?: Check
Payment Method Name: Credit Card
Code: LP
Payment class name: ps_linkpoint
Payment method type: Use Payment Processor
Accepted Credit Card Types: Visa, MC, etc.

Then in Configuration try:

Linkpoint Store ID: ###### (your store id #)
Location Of Public Keyfile: /etc/linkpoint/mykey#.pem (the full path of your LinkPoint Keyfile)
Request/Capture Credit Card Code Value: YES
Recurring Billings? NO
Pre Auth for Recurring Billing? NO
Payment Extra Info: EMPTY (no form code needed)

What do you get when you try with these settings?

lonelywaves

Hi,
Thnx again for your reply. Is it compulsory to have a SSL certificate to work with Linkpoint?

Regards,
Fenil

FireIslandMan

I don't know if it is compulsory to have a SSL certificate to work with Linkpoint, but it is strongly recommended if you want to guarantee your customers that credit card orders between your browser and site's web servers are private and secure. So did you get it working yet?

lonelywaves

No actually I am waiting for my client's reply about SSL. Can it work locally? Do we need to put form code in the payment configuration area or data are automatically read by linkpoint?

lonelywaves

No it isn't working yet. I have created a test account in Linkpoint and I have worked as below
My Linkpoint store name: 1909827377
I have kept lphp.php file in payment dir.
I have kept my test account pem file at this location 'D:\Fenil_All\joomla\addons\1909827377.pem' and provide this location in configuration file.
My form code is as below:
Quote
<?php
$url = "https://www.staging.linkpointcentral.com/lpc/servlet/lppay";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
"mode" => "fullpay",
"charge" => round( $db->f("order_subtotal")+$tax_total-$discount_total, 2),
"storename" => "1909827377"
);
if( $page == "checkout.thankyou" ) {
$query_string = "?";
foreach( $post_variables as $name => $value ) {
$query_string .= $name. "=" . urlencode($value) ."&";
}
mosRedirect( $url . $query_string );
} else {

echo '<form action="'.$url.'" method="post" target="_blank">';
echo '<input type="submit" value="Continue to secure payment form">';

foreach( $post_variables as $name => $value ) {
echo '<input type="hidden" name="'.$name.'" value="'.$value.'" />';
}

echo '</form>';

}
?>

Do let me know where I am wrong over here.
Do I need to make any settings in my Linkpoint account?

FireIslandMan

Please refer to the above posts again (I updated some steps). Don't know if it can work locally. Don't have to put form code in the payment configuration area, data is automatically read by Linkpoint. And please delete your Linkpoint store id from your post! Good night, and good luck...

lonelywaves

Thnx for your concern. This is my test account ID so its ok. But still I am getting the same error. I tried with all the options.  ??? :-[ :'(