News:

Support the VirtueMart project and become a member

Main Menu

Is there a SIM payment method in Virtuemart?

Started by amable, March 30, 2006, 20:30:55 PM

Previous topic - Next topic

amable

Hi.

I would like to know if there is a payment module already done for simple integration method (SIM), because I only see advanced integration methods (AIM) in Virtuemart and I need to make one SIM payment method and I would like to use  one already done as a base.

|              | 1 --------->|       |
|virtuemart|    (post)   |bank|
|              |<--------- 2 |       |


Plz help.

Thanks!


Amable.

simbo1905

i guess that you are talking about Authorize.Net  ???

amable

I need to make a new payment method that gives the bank the control by sending them the transaction vars, then the bank displays a "wait plz" page and after thar sends the aproved/denied vars to a page in Virtuemart.

This is called simple integration method.

All I can see in Virtuemart default's payment methos is AIM (using curl), but this bank doesn't wotk that way :(

So, can anybody give some clues?

Thanks.


Amable.

simbo1905


what bank? which documentation for their payment gateway? link or attach please.

amable

This is in Venezuela.

Bank: Banco de Venezuela ( http://www.bancodevenezuela.com )

attaches the document that contains the technical specifications for using their online payment. (is in spanish of course)



[attachment cleanup by admin]

simbo1905

#5
not that i read spanish but the code on the last page looks remarkably similar to the standard PayPal module for virtuemart. if you enable the paypal module, then go to its configuration tab, you will see a similar web form as your doc with the php code to drop in values from the cart.

[::snip::]

other payment modules use digests. you must be careful that the calculated digest does not include characters that will break the html form of break the php code which renders the form. bad characters will be \ and ' or ". you should search and replace these and escape them \ or \\.

[::snip::]

if i were you i would turn on the standard paypal module and figure that one out. once you have it working then clone it and hack the paypal form on to be the same as the one in the doc calculating the digest code using their method.

amable

#6
I apreciate the effort that you have made :)

The digest is not a issue, that's already done.

The real problem is:

I need to send transaction vars to a URL con bank, after showing a temporary webpage (I guess somthing like "plz wait"), that URL send result vars to an URL back on my server using POST. I have seen that the payment methods in Virtuemart use curl and the control never leaves my webserver, so I don't know what is the URL receiving the return vars on my Virtuemart. Consider that I can't change the code on bank side, so I can't add extra vars on return post.

So, witch is the return path to be sent to the bank ir order to the bank send back to that URL the transaction result?

simbo1905

#7
the standard paypal module does *exactly* what you need to do.

i both a curl module (AIM) and the paypal module (SIM) on my live sites. so i know the difference and i know how SIM works on my site. it is very like what your document shows.

turn on paypal. look at its configuration tab. you will something that is most *exactly* like what you see at the bottom of the documentation.

you do not need to invent the "plz wait" page. watch what the paypal module does SIM.

;D

there is an PayPal Pro AIM module but that is not in the release virtuemart. the PayPal SIM module is in the release of virtuemart.

amable

Only one more thing,
could it be posible that you attacht your sim payment method file and config in a post for me? I'll apreciate because it could help me to compare with what I have here (in my file ps_paypal.php, the function process_payment only have a "return true;" )

Thanks.

Amable.

simbo1905

Quote from: amable on March 31, 2006, 17:24:39 PM
....with what I have here (in my file ps_paypal.php, the function process_payment only have a "return true;" )

yes that is correct that it returns true. at that point a AIM would have taken the money. you need to get past that point. if you returned "false" then you would stop the process. you should configure the payment module that "true" does not mean that the order is 'confirmed'. "true" should be configured to set the order as 'pending'.

as you can see when you run the paypal module the next step is to send them to the paypal site (have you set up and used paypal to understand it??). you would of course change that to send them to your bank. you bank would take the payment and immediately redirect the browser back to the page that you tell the bank to return the customer to. the customer will never see the bank website as it will only give the customer browser a redirect back to your site. configure the bank AIM system to return them to the script "/administrator/components/com_virtuemart/notify.php". modify this script can then check the digest before it updates the order to be 'confirmed'.