Author Topic: Almost there! Help with a the checkout process PLEEASE!  (Read 10474 times)

aramil

  • Beginner
  • *
  • Posts: 38
Almost there! Help with a the checkout process PLEEASE!
« on: August 09, 2006, 18:50:37 pm »
Hi all! I need to send the cart info to my paymet gateway (order, items, price, etc) so the bank (in his enviroment) can receive the payment from the user and send me back the information, so i can conclude the process. How i can integrate VM with this? I need to develop a script to be included in a Payment module? There is some guide to follow? I must use as guide the paypal payment module and recode it? There is some basic script to modify to archive this goal?

Im new with payment modules process and really need the help of you guys!

All men die, not all men really live!

Soeren

  • Administrator
  • Sr. Member
  • *
  • Posts: 3106
  • VirtueMart Starter
    • virtuemart.net
Re: Please help me to write a payment module!
« Reply #1 on: August 09, 2006, 19:08:31 pm »
Hi,
that's a little bit lazy of you, don't you think?
Please have a look at the existing payment modules.

THEN we could help you with some details.
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

aramil

  • Beginner
  • *
  • Posts: 38
Re: Please help me to write a payment module!
« Reply #2 on: August 11, 2006, 03:05:06 am »
Hi Soeren!

Sorry i dont wanted to be lazzy (i dont know what that word mean, i guess is something bad). I´ll look for the existing payment modules, and i´ll post again. I just needed a little guide to know what i must look for because is the first time i use a payment gateway and virtuemart. Sorry again.

Thank you

All men die, not all men really live!

aramil

  • Beginner
  • *
  • Posts: 38
Re: Please help me to write a payment module!
« Reply #3 on: August 12, 2006, 19:39:10 pm »
Hi soeren and all the VM team!

I look the developer guide, and the existing paymento modules. I guess i can use a html script that my bank send me to create the payment module, but i have a couple of questions, to understand this process:

this is the info request to VM in the code they send me:

****************
<%!
   int invNum=900;
%>
<%
        String items = "una lechuga, dos tomates, tres zanahorias";
   String invoiceNumber = request.getParameter("invoiceNumber");
   String totalAmount = request.getParameter("totalAmount");
   String extra = request.getParameter("extra");
   String tax = request.getParameter("tax");
   String date = new java.util.Date().toString();

***********
THEN:
***********

<TR>
<TD align = "center">
<xxxx:paymentButton
  serverUrl="https://123.45.678.900/xxx/xxx"
  path = "/xxxxx/xxx.jar"
  invoiceNumber = "<%= invoiceNumber%>"
  tax = "<%= tax%>"
  extra = "<%= extra%>"
  totalAmount = "<%= totalAmount %>"/>
</TD>

***********
 
1) The STRING lines recollect that info from VM or the paymentButton related lines? In that case those are the right settings?
2) The String Items line have some examples, but what i must use there in order to request the order items from VM?

All men die, not all men really live!

aramil

  • Beginner
  • *
  • Posts: 38
Re: Please help me to write a payment module!
« Reply #4 on: August 13, 2006, 20:06:14 pm »
Hi again:

Let me explain myself: My bank use a .war aplication that include: The HTML Form (a page where the user choose the credit card to use) , and a notify page (that verify the info from the gateway server and show to the user the information of the transaction to print).

Reading:

http://virtuemart.net/index.php?option=com_jd-wiki&Itemid=109&id=references:payment:examples:paypal_payment_class_and_notification_processor

I see how is the configuration of paypal payment module. So, if i understand, i just can create a new payment module and insert the html code of the file of my bank (the form one) in the extra field (with the right enviroment variables (http://virtuemart.net/index.php?option=com_jd-wiki&Itemid=109&id=tutorials:paymentmodules)), create a notify.php file (using paypal example) and replace with the code of the notify page that my bank send me, leting the remaining code (like access to joomla, virtuemart configuration), with the new modifications? (paths, mails setttings, etc)

I´m mising some step here?

I dont mean to be lazzy, just im not a coder and is a little hard to understand it at first look.

Please, i need a little dummies guide here. I´ll apreciate all the help that i can receive from you guys!
All men die, not all men really live!

aramil

  • Beginner
  • *
  • Posts: 38
Re: Help with a gateway payment module.
« Reply #5 on: August 15, 2006, 03:57:53 am »
Hi!

Im a little bit lost with this issue. My payment gateway uses a html page with the option to chosse the credit card type (after request the data from an example form, i guess i must request that data from VM), then redirect the user to the server of the bank to make the payment, and then they have a notify page with the info about the transaction (i guess i must redirect the user to VM after that to the checkout page). I understand the process, but i dont know how i must do it. I must copy the code of those page into a custom payments module files? i mean, the credit card type page into a ps_MYMODULE, the notify page into a notify-MYMODULE and what i must do with the ps_MYMODULE.cfg? Please need some guide in here. The Multypay module is a good example, but still i dont know what i must do with the the jsp. pages that my gateway send to me. If i use the example that they send to me, that work great, but i dont know how integrate it with VM.
All men die, not all men really live!

mrosile

  • Beginner
  • *
  • Posts: 17
Re: Help with a gateway payment module.
« Reply #6 on: August 15, 2006, 04:20:06 am »
Hi aramil,
    After reading your previous posts, it looks like the code that you were given by your payment gateway was written in ASP or possibly JAVA.  Unfortunately that code will not work with VirtueMart.  VirtueMart only supports code written in PHP.
     It IS possible for you to integrate your payment gateway into VirtueMart, but you will need to either learn PHP or find someone who knows PHP and can dedicate some time reading over the documentation provided by your payment gateway.
     I would suggest you try to use a payment gateway that is already supported by VirtueMart, like PayPal.
     I'm sorry that I cannot help you any further.

- Mike R.

aramil

  • Beginner
  • *
  • Posts: 38
Re: Help with a gateway payment module.
« Reply #7 on: August 15, 2006, 05:56:05 am »
Hi mrosile

Thanks for your reply. Now i see why i can`t understand the documentation about the payment module and my gateway files, yes those files are written in Java.
And thanks for give me a little hope in this issue. Just for curiosity, if i use some payment module, like paypal or multypay, like a base code, and make the pertinent editions i can make this work???

Thanks

Johnny

PD: I only need to send the order info (Total amount, items, tax, date) to the .jsp page that process the payment (redirecting the user to the gateway server), and then return, from the notify.jsp page, to VM to checkout. Is this too dificult to do?

I just read a post of soeren

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=7258.msg7331#msg7331

that says that sometimes we need to write a process_payment function that transfers Order and Payment Data between the shop and the Payment Processor. This is the first thing i need to do, there is some documentation for this?

All men die, not all men really live!

mrosile

  • Beginner
  • *
  • Posts: 17
Re: Help with a gateway payment module.
« Reply #8 on: August 15, 2006, 17:04:29 pm »
Johnny,
     It seems then, that your payment gateway DOES support HTML Form processing, which is good and should be fairly easy to do!  I think you have the right idea, and that is to take the existing PayPal payment module and rewrite it to support your payment gateway.
     Does that help?

- Mike R.

aramil

  • Beginner
  • *
  • Posts: 38
Re: Help with a gateway payment module.
« Reply #9 on: August 15, 2006, 18:19:51 pm »
Hi Mike!!

Yes friend, that help a lot. At last i understand what i must do. Paypal is the right choise to begin?, i see that Paypal have a lot of configuration options, in my case i only need to send the order id and the total amount. Have any idea of a single payment module to start with?? (until now i only know multipay).

Really thanks
All men die, not all men really live!

aramil

  • Beginner
  • *
  • Posts: 38
Re: Help with a gateway payment module.
« Reply #10 on: August 16, 2006, 06:20:39 am »
Hi all!

I almost get it!, i tryed using only the extra info of paypal module and doing the pertinent editions to work with my gateway, and the user is successfull redirect to the jsp page where he can choose the credit card type and go into the gateway server and make the payment. Now, after he complete the payment he will be redirected to a .jsp verification page in my site (with some data send it from the server). What i must do in order to complete the checkout inside VM??:

1) I must insert a "back" button inside the .jsp verification page to bring him back to VM (with the needed data to the notify-mypayment.php) and complete the checkout? or to other file?  If this is possible i can use the paypal notify.php as example? or where i must redirect the user to complete the checkout? (Will be nice use the update status option and the other options of the notify.php of paypal)

2) I can use a notify-mypayment.php (paypal example) without use the ps_xx.php and the ps_xx.cfg.php? or i must use those files in order to use the notify.php? How i can use it from the jsp page?



Thanks
All men die, not all men really live!

pabloferre

  • Beginner
  • *
  • Posts: 10
Re: Almost there! Help with a the checkout process PLEEASE!
« Reply #11 on: September 22, 2006, 23:05:09 pm »
Friend I am with you same problem, I need a new module for my banc, but I am not a coder, I have all the codes php codes from my bank but iis hard to implement it withou coding knoledge.
Did you finaly get it to work?