Cybersource secure acceptance hosted checkout fails and require billing information - c#

I am using asp.net for integrating cybersource payment gateway. I successfully gone to payment page but after filling card details and Pay, order automatically declined. When i search in Cybersource dashboard i get below error.
Client App
Secure Acceptance Web/Mobile
Reason Code
101
Reply Message
The request data did not pass the required fields check for this application: [bill_address1, bill_city, bill_country, customer_email, customer_lastname]
Reply
Incomplete Request Data
Reply Code
0
Applications
Credit Card Authorization
for example, i am sending below address in hidden fields
<input type="hidden" name="access_key" value="myaccess_key">
<input type="hidden" name="profile_id" value="myprofile_id">
<input type="hidden" name="transaction_uuid" value="mytransaction_uuid">
<input type="hidden" name="signed_field_names" value="access_key,profile_id,bill_address1,bill_city,bill_country,customer_email,customer_lastname,transaction_uuid,signed_field_names,unsigned_field_names,signed_date_time,locale,transaction_type,reference_number,amount,currency">
<input type="hidden" name="unsigned_field_names" value="">
<input type="hidden" name="signed_date_time" value="mytime">
<input type="hidden" name="locale" value="en">
<input type="hidden" name="bill_address1" value="test"/>
<input type="hidden" name="bill_city" value="London"/>
<input type="hidden" name="bill_country" value="GB"/>
<input type="hidden" name="customer_email" value="test#test.test"/>
<input type="hidden" name="customer_lastname" value="TEST"/>
and so on..........

The name that you have given in hidden input control for billing address is not the right one. Try with the below names it was working for me.
<input type="hidden" name="bill_to_address_line1" value="test"/>
<input type="hidden" name="bill_to_address_city" value="London"/>
<input type="hidden" name="bill_to_address_country" value="GB"/>
<input type="hidden" name="bill_to_email" value="test#test.test"/>
<input type="hidden" name="bill_to_surname" value="TEST"/>

Related

MVC ASP.NET Url.Action in form action, passing it form data

<form action="#Url.Action("PokemonSteps", "PokemonView", new { id = Model.Id, steps = steps })">
<input type="number" name="steps" min="1" max="#Model.userSteps">
<input type="submit">
</form>
This form is a number box from 1 to the amount of steps the user has.
When they submit the number in the box, I want to pass it to #Url.Action as the steps in the steps = steps part.
How do I go about that (sorry for the really stupid question)
<form action="#Url.Action("PokemonSteps", "PokemonView")" method="post">
<input type="hidden" name="id" value="#Model.Id">
<input type="number" name="steps" min="1" max="#Model.userSteps">
<input type="submit" value="Submit">
</form>
Please add Attribute method="post" and share your controller method signature also...
Try doing something like this:
#using (Html.BeginForm("PokemonSteps", "PokemonView", FormMethod.Post)){
#Html.TextBoxFor(m=> m.userSteps)
<input type="submit" value="Submit" />
}
Hope this Helps!!

Is an unencrypted paypal button secure if you make suitable checks in your IPN?

I'm using the following code to create a payment button and am modifying the values for amount,currency_code and custom dynamically:
<input type="hidden" name="business" value="test1#example.com" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="item_name" value="test payment" />
<input type="hidden" name="amount" value="0" />
<input type="hidden" name="custom" value="0" />
<input type="hidden" name="notify_url" value="http://www.example.com/IPN.aspx" />
<input type="hidden" name="return" value="http://www.example.com/Thanks.aspx" />
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="test app">
<input type="hidden" name="button_subtype" value="services">
I'm passing the productID of the product im selling in 'custom' and then I'm then doing some checks in my IPN.aspx to check that the values for amount and currency have not been modified by using the ProductID to get details of the product price & currency from my database and comparing this to what is returned by paypal. Surely this is secure because if the details don't match in my IPN the payment is not recorded?
I've looked around for answers to this and people just say that it's not secure because you can use fiddler/tamperdata etc to change the values of the amount or currency code but surely if I'm checking in the IPN then this is secure. What are the security risks of doing the payment this way and is there any way to hack or abuse it?

Form tags distorting the div alignment in internet explorer

I have two divs in separate form tags. They render correctly in chrome and firefox but unfortunately not in IE. The alignment of the divs get distorted. If it remove the first form tag from the code it solves the alignment issue but I am not able to postback in the link in the second form tag.Hence I need to separate both the divs in two different form tags. Can somebody help
<form>
<div id="FundsNetworkNotAvailable" class="msgError" runat="server">
<%--These date is dynamically pulled from the config file--%>
<h2>Attention</h2>
<p>
FundsNetwork will be carrying out maintenance work on their website over the weekend from
<asp:Label runat="server" ID="FundsNetworkNotAvailableFrom" Text="19/12/2009" />
to
<asp:Label runat="server" ID="FundsNetworkNotAvailableUntil" Text="20/12/2009" />.
During this period, their website will become unavailable.
We apologise for the disruption and any inconvenience caused.
</p>
</div>
<br />
</form>
</form>
<form id="post_info_to_Fidelity" name="post_info_to_Fidelity" method="post" target="_blank" action="https://www.fidelity.co.uk/investor/site/general/jsp/general_set_cookie.jsp">
<input name="page" value="isaPlusAO" type="hidden">
<input type="hidden" name="WLSEDOLS" value="">
<input type="hidden" name="WLSEDOLS_INSIDE_ISA_VALUES" value="">
<input type="hidden" name="WLSEDOLS_OUTSIDE_ISA_VALUES" value="">
<input name="oafRate" value="0.45" type="hidden">
<input name="vatable" value="false" type="hidden">
<input name="Advicegiven" value="no" type="hidden">
<input name="partner" value="best" type="hidden">
<input name="Context" value="isaPlusAO" type="hidden">
<input name="IGNORE_RemoveUserFromSession" value="yes" type="hidden">
<input name="isNewClient" value="true" type="hidden">
<input name="AdviserClient" value="1" type="hidden">
<input name="AgentCode" value="170224" type="hidden">
<input name="returnURL" value="http://select.bestinvest.co.uk" type="hidden">
<input name="Title" value="" type="hidden">
<input type="hidden" name="Surname" size="25" maxlength="25" value="">
<input type="hidden" name="FirstNames" size="25" maxlength="25" value="">
<input type="hidden" name="HouseName" size="25" maxlength="25" value="">
<div class="ColSplit Third inset insetThird" style="border-bottom: 2px solid #E1E1E1;">
<h2 class="NoBorder">Select an investment option with FundsNetwork</h2>
<p>
To transact through FundsNetwork you will firstly need to login to your
<a href="https://www.fidelity.co.uk/investor/site/general/jsp/general_set_cookie.jsp"
title="Link to FundsNetwork account manager. (opens in a new window)"
target="_blank">FundsNetwork Account Manager </a>.
To access this you will need your
FundsNetwork Customer Reference Number (a ten digit number beginning with ‘1’
that can found on your most recent statement from FundsNetwork) and pin. Please
call FundsNetwork on 0800 995511 if you need help logging in to the account manager.
</p>
<div class="cta fRight">
<input title="Link to FundsNetwork account manager. (opens in a new window)" type=submit value=Go class="button">
</div>
</div>
</form>

Model binding to a List - how to handle inserts

I am referring to this post from Phil Haack http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx I need to do the same but what if I need to insert records in the list, at any index I wanted? How do I keep the indexes in sync short of doing some Javascript and updating all indexes?
<form method="post" action="/Home/Create">
<input type="text" name="[0].Title" value="Curious George" />
<input type="text" name="[0].Author" value="H.A. Rey" />
<input type="text" name="[0].DatePublished" value="2/23/1973" />
<input type="text" name="[1].Title" value="Code Complete" />
<input type="text" name="[1].Author" value="Steve McConnell" />
<input type="text" name="[1].DatePublished" value="6/9/2004" />
<!-- I want to insert a record here by adding the fields through JavaScript -->
<input type="text" name="[2].Title" value="The Two Towers" />
<input type="text" name="[2].Author" value="JRR Tolkien" />
<input type="text" name="[2].DatePublished" value="6/1/2005" />
<input type="submit" />
I didn't quite understand how I would use the "Non-Sequential Indices" described on that blog post for doing stuff like inserting records to specific index.
Any ideas?

ASP.net - Problem with integrating form

The WorldPay payment gateway suggests using this HTML to take the customer to the payment page:
<form action="https://select-test.wp3.rbsworldpay.com/wcc/purchase" name="BuyForm" method="POST">
<input type="hidden" name="instId" value="211616">
<input type="hidden" name="cartId" value="abc123">
<input type="hidden" name="currency" value="GBP">
<input type="hidden" name="amount" value="0">
<input type="hidden" name="desc" value="">
<input type="hidden" name="testMode" value="100">
<input type="submit" value="To Payment!">
</form>
How to I put this form on my page? The problem is I have a master page which wraps the content pages content in the ASP.net form, I can't nest the forms.
This is a bit of a hack, but I have used this with paypal in the past. Basiscally just put and extra form above the form you are attempting to post as in the following:
<form>
</form>
<form action="https://select-test.wp3.rbsworldpay.com/wcc/purchase" name="BuyForm" method="POST">
<input type="hidden" name="instId" value="211616">
<input type="hidden" name="cartId" value="abc123">
<input type="hidden" name="currency" value="GBP">
<input type="hidden" name="amount" value="0">
<input type="hidden" name="desc" value="">
<input type="hidden" name="testMode" value="100">
<input type="submit" value="To Payment!">
</form>
Enjoy!
You can customize the HtmlForm to get this to work. I gave a code sample here:
How to get past embedding a html form for paypal buttons asp.net
http://www.codersbarn.com/post/2008/03/08/Solution-to-ASPNET-Form-PayPal-Problem.aspx
I've used this several times with master pages :-)

Categories

Resources