Jump to content
Sign in to follow this  
btaneja

What are x & y parameters in most MS1 payment mods

Recommended Posts

I am trying to create a new payment mod and I keep getting: "incorrect parameter is being passed" from my payment processor.

 

So I wrote a little script that will spit out all the parameters that are being passed from OsCommerce to the processor.

 

First of all, I really did not write the new module from scratch, I have tried to use the various versions of Authorizenet, 2Checkout, secPay, psiGate, and for test purpose just pointed the "$this->form_action_url =" to my print out all parameters script.

 

To my shock, all these modules are sending out 2 more parameters besides the ones expected named "x" and "y". In each instance "x" and "y" contain randomly assigned values between 9 and 110 (for the few tests I ran).

 

My processor is giving errors "incorrect parameter passed" and I suspect its due to these 2 parameters that I can't find in the ~/includes/modules/payment/*.php files.

 

Can some one help ?

 

I think I am on OsCommerce version from July 2003.

Share this post


Link to post
Share on other sites

On another run, I don't think it was the x & y parameters as my processor ignores those when I use a regular static html file with all parameters like:

 

<input name="MERCHANT_TRANID" size="6" value="6035"> <input name="AMOUNT" size="5" value="64.29" > etc . etc.

 

but the same thing going from os commerces' payment module

 

as :

 

tep_draw_hidden_field('AMOUNT', '64.29') .

tep_draw_hidden_field('NEWTRANSACTION', 'Y') .

tep_draw_hidden_field('CARDTYPE', 'V') .

 

will end up with 'incorrect parameters'.

 

If I point the payment module to my own print_all_parameters script, it works fine.

 

Can there be a difference between the way the input name and tep_draw_hidden_field post ?

 

thanks

Share this post


Link to post
Share on other sites

The X and Y parameter values are automatically passed when an image is used as the form submit button, and represents the X and Y coordinates of where the user clicked on the image button. This is normal HTML behaviour and would have nothing to do with the problem you are experiencing.

 

Did you verify the HTML output of the page when using the tep_draw_hidden_field() functions?

Edited by hpdl

:heart:, osCommerce

Share this post


Link to post
Share on other sites
Did you verify the HTML output of the page when using the tep_draw_hidden_field() functions?

 

 

How do I do that?

 

All I have in my form action url test script is to print out each parameter passed. How do I see the HTML output, please ?

 

Thank you for your kind help !

Share this post


Link to post
Share on other sites

Dear hpdl,

 

:'(

 

I am looking at catalog/checkout_confirmation.php

 

Do I need to make a change some where here , so instead of 'post' it will give an HTML output.. or am I way off?

 

<?php

if (isset($$payment->form_action_url)) {

$form_action_url = $$payment->form_action_url;

} else {

$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

}

 

echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

 

if (is_array($payment_modules->modules)) {

echo $payment_modules->process_button();

}

 

echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";

?>

 

 

thank you !!

Share this post


Link to post
Share on other sites
How do I do that?

 

All I have in my form action url test script is to print out each parameter passed. How do I see the HTML output, please ?

 

On the Checkout Confirmation page you should view the html page source code via your browser and verify that the parameters in the form contain the correct values.


:heart:, osCommerce

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×