locked
Credit card payment using Merchant Account in asp.net c# application RRS feed

  • Question

  • User1907405591 posted

    I am junior dot net developer, i need one help for to build simple e commerce asp.net application.

    Trying to apply credit card payment using Merchant Account in asp.net application!  Can you please help me out that how can i make basic asp.net application for to use credit card payment and have every details of Merchant Account, i just need a system to take credit card payments.

    I just want the simple application which can do credit card payments with my Merchant Account details!

    Please help me out if you have any solution?!

    Thursday, April 19, 2018 6:43 PM

All replies

  • User-1825025844 posted

    Hi,

    you can use brain tree sdk for creditcard payments

    it has client side code and server side

    here are the links

    https://developers.braintreepayments.com/start/hello-client/javascript/v3

    https://developers.braintreepayments.com/start/hello-server/dotnet

    you will need to create an account on braintree

    for testing purposes make sandbox account, all of the transactions details you can see in that account

    once it works fine, then you can go live by creating production account

    Thanks

    Thursday, April 19, 2018 6:53 PM
  • User1907405591 posted

    Actually i just want to write a C# program that builds a Credit Sale transaction with using API Details which i have it already.

    i have the merchant account!

    Thursday, April 19, 2018 7:08 PM
  • User2053451246 posted

    Actually i just want to write a C# program that builds a Credit Sale transaction with using API Details which i have it already.

    i have the merchant account!

    Merchant account with who?  You should check their website.

    Thursday, April 19, 2018 7:14 PM
  • User1907405591 posted

    Hi,

    I just want to write a small asp.net e-commerce web application, can you please help out to me to find the source code for this application in c#?

    Thank you!

    Friday, April 20, 2018 2:45 PM
  • User-663551687 posted

    You see:

    https://www.youtube.com/watch?v=N0doF1jJhlY

    Online Payment using credit card
    https://code.msdn.microsoft.com/Online-Payment-using-e0760d8c

    PayPal-NET-SDK
    https://github.com/paypal/PayPal-NET-SDK

    Friday, November 23, 2018 5:23 AM
  • User876561910 posted

    The main thing is NOT to do this yourself.

    Of course it can be done and it’s very simple to code a Cart, but the problems that can be caused by this are too many to bother with it.

    The best way is to use a provider – world pay, sage pay, or one of the other big card processors.

    And this is even simpler to do.

    And you don’t have to worry about all the rules you need to follow if you store/process a user’s card details (there are MANY rules)

    All the card processors have very detailed instructions on how to do this.

     

    As an example let’s say you decided to use World Pay (which I think is the biggest card possessor)

    You would do it like this.

     

    On your first page you would have details of the product and the cost.

    The second page would go to the world pay payment page

    Something like this

     

     

    Page 1

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
    
    <head runat="server">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title></title>
    </head>
    
    <body>
    
    <form id="MyForm" runat="server">
    	The product you&#39;re buying
    	<asp:TextBox id="MyProduct" runat="server"></asp:TextBox>
    	<br />
    	The cost of your product is
    	<asp:TextBox id="MyCost" runat="server" AutoPostBack="true"></asp:TextBox>
    	<br />
    	<asp:Button id="MyButton" runat="server" PostBackUrl="MyPaymentForm" Text="Click to buy">
    	</asp:Button>
    </form>
    
    </body>
    
    </html>
    

    Page 2

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
    
    <head runat="server">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>2nd page</title>
    <script runat="server" language="VB" type="text/vb"> 
    
    Sub Page_Load()
    	Dim strProduct As String = Request.Form("MyProduct")
    	Dim strCost As String = Request.Form("MyCost")
    	
    	amount.Text = strCost
    	desc.Text = strProduct
    	
    	mode.Text = "ADD YOUR MODE HERE E.G TEST/LIVE/ETC"
    	instId.Text = "ADD YOUR MERCHANT ID HERE"
    	cartId.Text = "ADD SOME REFERENCE NUMBER HERE"
    	currency.Text = "ADD THE CURRENCY TYPE HERE"
    	name.Text = "CAPTURED"
    End Sub
    </script>
    <script language="javascript" type="text/javascript">
    function load()
    {
    document.getElementById('MyFormName').submit();
    }
    </script>
    </head>
    
    <body>
    
    Please do not press refresh or back as your order may be lost
    <form id="MyFormName" runat="server" action="https://secure-test.worldpay.com/wcc/purchase" method="post">
    	<div style="display: none">
    		<asp:TextBox id="mode" runat="server"></asp:TextBox>
    		<asp:TextBox id="instId" runat="server"></asp:TextBox>
    		<asp:TextBox id="cartId" runat="server"></asp:TextBox>
    		<asp:TextBox id="currency" runat="server"></asp:TextBox>
    		<asp:TextBox id="amount" runat="server"></asp:TextBox>
    		<asp:TextBox id="desc" runat="server"></asp:TextBox>
    		<asp:TextBox id="name" runat="server"></asp:TextBox>
    	</div>
    </form>
    
    </body>
    
    </html>
    
    




    Sunday, November 25, 2018 8:16 AM
  • User-2054057000 posted

    I have integrated Credit Card payments in my client's websites using Paypal - official docs

    When Inegrating paypay you have to do the following steps:

    1. In your website you create a cart where items which the user adds are stored.
    2. Next during checkout you ask user to do the payment, and you provide an order id in paypal payments. 
    3. So if payment is successfully made, then you know the order 'Id' for which the payment is made by seeing your paypal account. 
    4. To validate the paypal payments in your website you have to use paypal IPN.

    Check paypal IPN docs

    Sunday, November 25, 2018 10:09 AM