Payment gateway Options
vonlinaa
Posted: Thursday, October 19, 2006 11:15:45 PM
Rank: Aficionado

Joined: 7/23/2006
Posts: 172
How do I implement a payment gateway through Umbraco.

I have used the C# code for the website wizard containing the ecommerce.
The $100 question is how do I make a post to the payment gateway.

Do I use a usercontrol or is it possible to pull the information out in Umbraco.

The post has to be a static html with hidden fields like this

<input type="hidden" name="amount" value="23400" />
<input type="hidden" name="currency" value="208" />
<input type="hidden" name="orderid" value="1"/>

The fields I want to change is offcause "amount" and "orderid"



Søren Linaa
Level 1 & 2 Certified Professional
Simm
Posted: Friday, October 20, 2006 1:32:10 AM

Rank: Fanatic

Joined: 7/22/2006
Posts: 255
Location: Randers, Denmark
Hi Søren
<p>I'm no Umbraco wizard (yet) But I'd would recommend that you make an user control as this provides the most flexible solution and will save you some headache ;). Especially if you want to do more complex things like capturing the response from the payment gateway and so fourth.

Best Regards
Simon

Simm.dk - My base on the web - proud Umbracian since 2.0 Beta
vonlinaa
Posted: Friday, October 20, 2006 10:47:00 AM
Rank: Aficionado

Joined: 7/23/2006
Posts: 172
thanks for the advice Simon, but I'm not a .net wizard.

How do I make a simple usercontrol to post these hidden fields and use the code behind to get amount and orderID from the C# project.

Søren Linaa
Level 1 & 2 Certified Professional
darrenferguson
Posted: Friday, October 20, 2006 10:56:01 AM
Rank: Devotee

Joined: 7/19/2006
Posts: 83
vonlinaa
Posted: Friday, October 20, 2006 11:21:36 AM
Rank: Aficionado

Joined: 7/23/2006
Posts: 172
well the problem is not to make the makro in Umbraco.

I have made the usercontrol and need to edit the code behind to pass the values I need into the usercontrol on pageload. Im not sure if this is possible in a usercontrol. I can do it in a .aspx but can I implement this in Umbraco

Søren Linaa
Level 1 & 2 Certified Professional
darrenferguson
Posted: Friday, October 20, 2006 11:43:13 AM
Rank: Devotee

Joined: 7/19/2006
Posts: 83

What problem do you have?

I understand what you want to do, but I don't understand why you can't do it.

You should just be able to read post/get vars in the same way that you would in a webForm .aspx.

Thanks.
Darren.


Darren Ferguson - http://www.darren-ferguson.com
vonlinaa
Posted: Friday, October 20, 2006 6:37:18 PM
Rank: Aficionado

Joined: 7/23/2006
Posts: 172
Hi Darren

this is the code I'm dealing with. I have inserted runat="server" for the two fields I want to change and I can grap it in the code behind.

when I insert the macro in Umbraco around <?ASPNET_FORM> tag I only get a blank page.

Code:

<%@ Control Language="c#" AutoEventWireup="false" Codebehind="epay.ascx.cs" Inherits="store.epay" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript" src="http://www.epay.dk/js/standardwindow.js"></script>
    <title>Vent venligst... Henter betalingsløsning...</title>
</head>
<body onload="open_ePay_window()">
<form method="post" action="https://ssl.ditonlinebetalingssystem.dk/popup/default.asp" target="ePay_window" name="ePay" id="ePay">

        <input type="hidden" name="merchantnumber" value="8888888">
        <!-- runat server fields -->
        <input type="hidden" runat="server" id="amount" name="amount" value="100"/>
        <input type="hidden" runat="server" id="orderid" name="orderid" value="1234" />
        
        <input type="hidden" name="currency" value="208" />    
        <input type="hidden" name="accepturl" value="http://www.ditdomæne.dk/stitilfil/" />
        <input type="hidden" name="declineurl" value="http://www.ditdomæne.dk/stitilfil/" />
        <input type="hidden" name="instantcapture" value="0" />
        <input type="hidden" name="ordretext" value="Tekst til kvitteringen som vises for kunden" />
        <input type="hidden" name="group" value="" />
        <input type="hidden" name="description" value="Beskrivelse som kan ses inde i administrationen til ePay" />
        <input type="hidden" name="windowstate" value="1" />
        <input type="hidden" name="authmail" value="" />
        <input type="hidden" name="addfee" value="0" />
        
</form>
</body>
</html>


Søren Linaa
Level 1 & 2 Certified Professional
vonlinaa
Posted: Friday, October 20, 2006 6:38:59 PM
Rank: Aficionado

Joined: 7/23/2006
Posts: 172
hmm this looks like crap.


Søren Linaa
Level 1 & 2 Certified Professional
vonlinaa
Posted: Sunday, October 22, 2006 1:21:33 PM
Rank: Aficionado

Joined: 7/23/2006
Posts: 172
It seems like the theres added extra code when I look at the source code in the browser.

<input name="epay1$orderid" type="text" id="epay1_orderid" value="ordreid123" />

name="epay1$orderid" where it should say "orderid"
id="epay1_orderid" where it should say "orderid"

how do I get rid of the extra code "epay1$" - Any ideas

Søren Linaa
Level 1 & 2 Certified Professional
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.