Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Protx Direct v2.22


Guest

Recommended Posts

I am also getting a problem listed above where I receive multiple transactions per order and in one case now, no transaction has been saved in the database at all, but it is still in the VSP Admin. I can't quite work out why this occurs.

 

Also, just recently the new protocols for Authenticate and Authorise has been released for simulator testing so this could be added to the module.

 

Scott

Edited by AoM_Scott

no outside links please

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

I am already part way through updating the module for the new Authenticate / Authorise protocol, and taking the opportunity to tidy up the code a bit and introduce some minor improvements.

 

When you say that no transaction was saved in the database, was the actual customer's order logged to the db? - The order saving occurs after all the protx stuff has completed - if neither are logged then it could be a redirect issue, if the order is logged but not the payment then it's a module problem. If the order is logged, have you checked the protx_direct table to see if the transaction is there but not showing in admin - I have recently found the case where when an order is deleted the order number used for the transaction is out by 1 (as the order table autoincrement is not the same as last order number+1), so the transaction is saved but doesn't appear in the order page as the order numbers are different (does that make sense?).

 

Tom

Link to comment
Share on other sites

Like you said the transaction has been saved but the ID for the order and last order + 1 do not match due to an order deletion so its referencing an order that doesn't exist.

 

But I can't relate that to this other problem I'm having. Here is a screenshot from my protx_direct table. It shows a duplicate transaction report, although one transaction is carrying no data.

 

protx_direct.png

 

The first highlight shows the duplicates and the second shows the order with the wrong ID.

 

Scott

no outside links please

Link to comment
Share on other sites

In the latest update I've included a modification to prevent duplicate orders due to customers clicking twice. I have also improved the code to ensure accurate order_ids even when orders have been deleted etc.

 

Unfortunately I can't release the module yet as the are some discrepancies between the new protx documentation and the responses/requirements the simulator software is using - I need to wait for a reply from Protx to sort it out!

 

Tom

Link to comment
Share on other sites

In the latest update I've included a modification to prevent duplicate orders due to customers clicking twice. I have also improved the code to ensure accurate order_ids even when orders have been deleted etc.

 

Unfortunately I can't release the module yet as the are some discrepancies between the new protx documentation and the responses/requirements the simulator software is using - I need to wait for a reply from Protx to sort it out!

 

Tom

looking at the protx_process.php it does not perform any input/session validation, but starts storing records in the database.

 

This is the only check

if ($_GET['action'] == '3Dreturn') {

while the subsequent "else" does not check anything.

 

and the module does not sanitize the $_GET/$_POST parameters but you're passing them straight to the database and to the curl:

 

		tep_db_query("insert into " . TABLE_PROTX_DIRECT . " (id, customer_id, order_id, vendortxcode, txtype, value, vpstxid, status, statusdetail, txauthno, securitykey, avscv2, address_result, postcode_result, CV2_result, 3DSecureStatus, CAVV, txtime) values ('', '" . $_GET['customerid'] . "', '" . $_GET['OrderID'] . "', '" . $_GET['VendorTxId'] . "', '" . MODULE_PAYMENT_PROTX_DIRECT_AUTHORIZATION_TYPE . "', '" . $_GET['total'] . "', '" . $responses['VPSTxId'] . "', '" . $responses['Status'] . "',  '" . addslashes($responses['StatusDetail']) . "', '" . $responses['TxAuthNo'] . "', '" . $responses['SecurityKey'] . "', '" . $responses['AVSCV2'] . "' , '" . $responses['AddressResult'] ."', '" . $responses['PostCodeResult'] ."', '" . $responses['CV2Result'] . "', '" . $responses['3DSecureStatus'] . "', '" . $responses['CAVV'] . "', CURRENT_TIMESTAMP)");

 

the code needs to check several things including if the customer is logged-in before setting up the dbase records.

Link to comment
Share on other sites

Hi, I currently use paypal and its driving me round the bend how many people dont pay because either they dont like paypal or their card doesnt work or it tries to get them to sign up to an account etc etc. Anyway I have decided that a proper payment gateway and merchant account is the only way to do it properly.

 

I looked around and it seems that as a payment gateway Protx is the best value, so now I just need to sort out a merchant account (I use Abbey and they use streamline for their merchant account stuff so I think I'll go with them) and get protx sorted.

 

My question is whether this Protx conrtibution is working pretty well for people or not? I remember one of the problems I had with paypal was when they closed the paypal window without returning to my site and the order got lost (but I got the money). I used the Paypal IPN module to fix this - does the same kind of problem happen with the Protx module?

 

Cheers,

 

Reuben

Link to comment
Share on other sites

one of the problems I had with paypal was when they closed the paypal window without returning to my site and the order got lost

 

With Protx VSP Direct it's only the data which passes back and fore your site and Protx, the customer remains on your website. So the problem you get with Pay Pal of the customer not clicking to return to your website does not exist with this module.

 

This is a whole different ballgame to Pay Pal, much more professional and you also get to process orders taken over the phone via your VSP Terminal.

 

Vger

Link to comment
Share on other sites

As there seems to be no known fix for the incorrectly doubled prices I was wondering if anybody can tell me how to stop oscommerce from sending the basket contents to protx?

Link to comment
Share on other sites

"doubled prices"?? - What problem does this refer to? I'm not aware of a problem where it is sending double prices.

 

If you don't want the basket details sent to protx then simply go into your admin, select Modules > Payment > Protx Direct > Edit > "Send Shopping Cart" > "False" > Save

 

Tom

Link to comment
Share on other sites

Tom,

 

Just noticed a small problem, the Customer telephone field is set to 32 in the db, but protx only accepts 20chars, so the transaction fails if the customer has put a very long number in the telephone field

Link to comment
Share on other sites

So with Protx direct you take the CC details on your site - do they get stored on your site, or just passed to the Protx bit?

No details are stored in your database - they are passed to Protx who take on the risk of storing details and undergo the required security certification.

 

Tom

Link to comment
Share on other sites

Hi

 

Could i ask what level of failed transactions an average store might get per month ? whats your experience ?

 

I am noticing a lot of transactions declined by the aquiring bank , in 16 days this month so far approx £1,800 ??

 

some of these turn out to be succesfull if the customer tries again with another card, but the majority do not ?

 

anyone have any info on possibe causes other than no money in the bank ?

 

Most of my failed transactions have no customer or card data in protx admin other than "declined by the acquiring bank" , i'm using Protx Direct.

Link to comment
Share on other sites

I'm not sure off the top of my head how many fail but have you have a look at the protx_direct table in your db - the 'status' and 'statusdetail' fields may give you more information about the failed transactions.

 

Other cuases are often AVS or CVV failures (or now 3D failures) - Protx doesn't always seem to record them fully in the protx admin for some reason.

 

Tom

Link to comment
Share on other sites

Hi,

 

Protx Direct is installed and working on our site but we've found that the error messages on the checkout_payment do not show

up. The box which says Credit Card Error does but is just empty (yellow).

Although the error message is appened to the address. I have had this

problem with the discount coupons module as well due to the Simple Template

System ignoring the standard way oscommerce deals with errors etc. Someone came up with a fix for

checkout_payment.php so that they showed, but I could not find one on this thread.

Does anyone know of a safe way to fix this problem? Someone must have it working with STS :)

 

FYI

 

The code added before to get Discount Coupon errors to show was:

 

<?php
 if (isset($HTTP_GET_VARS['error_message']) && 
tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo 
htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table></td>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && 
tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
<td class="headerInfo"><?php echo 
htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table></td>
<?php
 }
?>

 

 

Thanks

Becki

Link to comment
Share on other sites

@becki - I'm not sure about error messages & STS - the protx module uses the standard osC payment module error message system - if I get time I'll try and look into it - perhaps ask in the STS thread about payment modules in general.

 

@Reuben - You need an SSL cert and cURL installed on the server - to find out about cURL - go into your admin then tools>Server Info and you should find a section headed cURL.

 

Tom

Link to comment
Share on other sites

@becki - I'm not sure about error messages & STS - the protx module uses the standard osC payment module error message system - if I get time I'll try and look into it - perhaps ask in the STS thread about payment modules in general.

 

I've tried a few bits of code that normally make the error messgaes appear for STS but it's not working. Here is a bit of checkout_payment I was playing around with which has got me a little step further!

 

 

<?php
 if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
	  <tr class="infoBoxNoticeContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table></td>
<?php
 }
 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table></td>
<?php
 }
 if (isset($HTTP_GET_VARS['payment_error']) && tep_not_null($HTTP_GET_VARS['payment_error'])) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars($HTTP_GET_VARS['payment_error']); ?></td>
 </tr>
</table></td>
<?php
 }
?>

 

The $HTTP_GET_VARS['error_message' and $HTTP_GET_VARS[info_message] were put in as a fix to get discount coupon errors showing. So I just copied that code and put in the 'payment_error' . By doing this I get 'protx_direct' shown as an error - which is a start! The error message in the address was:

 

.....checkout_payment?payment_error=protx_direct&error=The+credit+card+number+entered+is+invalid.+Please+check+the+number+and
+try+again

 

When a discount coupon error appears you get something like:

checkout_payment?error=The+coupon+is+invalid

 

SO is there a way to try and ignore

payment_error=protx_direct&

and then the message will be the same format as the discount coupon errors messages. I hope you can see what I'm getting at! It could all be wrong but it seems this is the way to go?...

 

Thanks

Becki

 

P.S although why isn't the pre-existing code of

(isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']})

(top of code from checout_payment) working?!

 

Without changing anything - I should say that the 'Credit Card Error' text appears but there is no text in the box.

Link to comment
Share on other sites

I have noticed i am getting

 

Internal Server Errors 500

 

Address http://DOMAIN/protx_process.php

 

the log file shows:

 

[error] [client 0.0.11.96] Premature end of script headers: php-script, referer: https://domain/checkout_confirmation.php

 

I have changed the domain address/ip to post on the forum.

 

Any body having similar problems?

 

Any ideas?

 

Thanks

Link to comment
Share on other sites

Hello again - got the merchant account and the protx test stuff. Its nearly there, just one problem (I did post this elsewhere but not much response):

 

My site allows the customer to see prices in GBP EURO and USD, but when the order gets placed the payment gets taken GBP. This worked well with the paypal ipn module - people like to know approx how much it is in their currency, and its made clear at the order confirmation stage how much in GBP will be taken from their account. HOWEVER, with the protx module it doesnt work - if I try and place an order in EURO or USD then it fails to checkout and just returns to the payment page. To clarify, I dont want to take payment in EURO or USD I just want to take payment in GBP, regardless of whether the customer chooses to look at the price in EURO or USD. What I want is at the point at which the info is sent to protx, the currency/amount to be always changed to GBP.

 

Any ideas? Everything else seems to work ok, just need to fix this then its sorted.

 

Cheers,

 

Reuben

Link to comment
Share on other sites

You did get answered in your other post, but obviously you didn't like it and thought you'd try to get a different one.

 

To repeat - the services offered by Protx and Pay Pal are entirely different, and Protx processes payments in UK Pounds Sterling but you are running your website in multi-currency.

 

There is no switch in Protx to only take payments in UK Pounds, because it is assumed (as Protx is for UK Pounds Sterling and UK processing Banks only) that your website also uses UK Pounds Sterling.

 

It should be relatively easy to put a switch into your site so that if someone chooses US Dollars or Euros as their currency that they don't then get to see Protx on the checkout_payment.php page - but to do a currency conversion in the middle of the checkout process isn't going to happen.

 

Vger

Link to comment
Share on other sites

I am surprised you don't think this would be useful.

 

If people from other countries want to order goods from a website they often want to know how much a GBP amount is in their currency before they purchase the item. What this normally means is going off to a website like www.xe.com and finding the conversion there.

 

It is therefore convenient for them to see this conversion on the oscommerce website, for indication purposes, despite the final amount being charged in GBP.

 

Perhaps a better way of doing it would be to show the USD/EURO amount in () next to the prices and stick with GBP the whole way though...

Link to comment
Share on other sites

... and yes i did get your reply to my original post. You seemed to think I wanted to pass the EURO/USD amount to protx, which I dont. I explained this in a reply to your post, and that wasnt replied to. I then remembered there was this main support thread for the Protx module and thought my query would be better posted here.

Edited by reubenwilcock
Link to comment
Share on other sites

I am surprised you don't think this would be useful.

 

If people from other countries want to order goods from a website they often want to know how much a GBP amount is in their currency before they purchase the item. What this normally means is going off to a website like www.xe.com and finding the conversion there.

 

It is therefore convenient for them to see this conversion on the oscommerce website, for indication purposes, despite the final amount being charged in GBP.

 

Perhaps a better way of doing it would be to show the USD/EURO amount in () next to the prices and stick with GBP the whole way though...

 

Read back a page or so and I've explained how to handle this and switch to default currency at checkout confirmation, take a look at my site www.dirtbikebitz.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...