Zen Cart Logo
Forums / Managing Customers and Orders / After Checkout Processing Order ID to Bank

After Checkout Processing Order ID to Bank

Locked

Views: 1,426

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
5 Oct 2010, 9:36 PM
#1
dito20 avatar

dito20

New Zenner

Join Date:
Oct 2010
Posts:
3
Plugin Contributions:
0

After Checkout Processing Order ID to Bank

Hello People,
I'm new within this community and also with Zen Cart. I'm developing a new site where I'm asked to do certain thing:

After the customer reaches final checkout (where the order is confirmed and customer has to press confirm order button) customer must be redirected to bank's checkout page.
Also, certain information must be transformed to that page.
I have a code from bank which i cannot integrate into the system and need your support very much.
Here is how code looks:

<!--body onload='frm.submit()'--> <body style="color: #336699; font-family: Verdana"> <form action="certain web-site" method=post" method=post name="frm"> <input name="PurchaseDesc" type="hidden" value="2222" /> <input name="PurchaseAmt" type="text" value="20" /> <input name="CountryCode" type="hidden" value="value" /> <input name="CurrencyCode" type="hidden" value="value" /> <input name="MerchantName" type="hidden" value="value" /> <input name="MerchantURL" type="hidden" value="value" /> <input name="MerchantCity" type="hidden" value="value" /> <input name="MerchantID" type="hidden" value="value" /> <input name="xDDDSProxy.Language" type="hidden" value="01" /> <input type="submit" value="Finalize payment" /> </form> </body>

(vales are not yet edited so it doesn't matter)

So here is the issue:
When the customer presses confirm order, i want him to be redirected to the site provided in code and send this values to that source as well. As you can see this is a Form type. I want this to be hidden and integrated into "confirm order" button. All the values must be static except 2 values which are "PurchaseDesc" and "PurchaseAmt". These values must be ALWAYS dynamic and they must contain the Unique Order ID which is created by Zen Cart and the payment amount, so that each time customer confirms order, these values are generated automatically. So i somehow need to configure and make this code executable. I don't need adding new buttons to page, i want it to happen by pressing the confirm order button.

I hope I explained the issue clearly. I'm really stuck with this matter and I really need help and advise. Perhaps i somehow can manage it by editing some Payment Modules or some other thing.
I hope you can help me resolving this problem. Huge Thanks in Advance!

6 Oct 2010, 9:11 AM
#2
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: After Checkout Processing Order ID to Bank

You need to create this as a Payment Module. All the functionality you require is already built into Zen, and you just need to build the Payment Module class file, so that it directs the buyer to the right URL.

With the Unique ID, we normally check the next order number with a database lookup on the last ID, and add 1. Then we add a random integer string using the TIME() function, so our unique ID is somehting like 1-123456. The reason for this is if you have multiple customers attempt checkout at the same time, they all get the same Unique Order ID. By adding the TIME() function, you eliminate this risk.

Details on how to code Payment Modules can be found in the Wiki: here

Absolute

6 Oct 2010, 9:37 AM
#3
dito20 avatar

dito20

New Zenner

Join Date:
Oct 2010
Posts:
3
Plugin Contributions:
0

Re: After Checkout Processing Order ID to Bank

Thanks that was a helpful post. However, I'm wondering whether there is an existing payment module which more or less is suitable and compatible with my needs and which i can just easily edit with my code and make it functional. Are there any like this? I'm newbie with Zen Cart and I'm also not good at php so writing a new class for payment will be a problem for me. I posted code above which must be function. Can you give me certain guidlines how i can make it functional with the Unique ID working with Time (as you mentioned) and with Money amount. Which function do i need so that when the order is proceeded the Unique ID and Overall Price are sent to the certain web page (displayed in code above) where customer will be able to pay with his credit card. Unfortunately, i have to work with this option because that is what i am asked to do.

6 Oct 2010, 9:53 AM
#4
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: After Checkout Processing Order ID to Bank

I would suggest taking a look at the Authorize.net module, which works in a similar way to the module you require.

With Payment Modules, there are a number of critical issues to consider. For example, you need to be able to confirm that the response you receive from the Bank is actually from the bank, and not a fraudulent transaction. This is not something to be undertaken by the faint-hearted.

I don't want to discourage a Zen newbie, but writing a Payment Module is not an easy project to take on as your first exploration into PHP, not due to the nature of Zen, but due to the nature of the PHP knowledge required.

Absolute