|
what am I doing incorrect:
Dim number = Regex.Match("50%", "\d+$").Value
number is empty
|
|
|
|
|
You're using the "end-of-line" anchor ($ ), but the number is not at the end of the line. You want to match the literal % character instead.
Dim number As String = Regex.Match("50%", "\d+%").Value
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
now we have cart and when user click on check out button then we have a code which run and redirect user to paypal web site and from there user purchase.
now i like to show how we pass user selected product data and user details to paypal web site.
here is the sample code
NameValueCollection data = new NameValueCollection();
data.Add("cmd", "_cart");
data.Add("business", "test@gmail.com");
data.Add("invoice", 1);
data.Add("item_name_1", "Audi part1");
data.Add("amount_1" , 200);
data.Add("item_name_1", "BMW part1");
data.Add("amount_1" , 300);
data.Add("item_name_2", "carriage");
data.Add("amount_2" , 500);
data.Add("item_name_2" , "insurance");
data.Add("amount_100" , 100);
data.Add("item_name_2", "VAT Amount");
data.Add("amount_2" , 100);
data.Add("country", "GB");
data.Add("currency_code", "GBP");
data.Add("cn", "How did you hear about us?");
data.Add("upload", "1");
data.Add("address_override", "1");
data.Add("first_name", "customer first name");
data.Add("last_name", "customer last name");
data.Add("address1", "customer address1");
data.Add("city", "customer city");
data.Add("state", "customer state");
data.Add("zip", "customer post code");
data.Add("return", "http://abc.mysite.net/catalogue/order/PayPalSuccess.aspx");
data.Add("cancel_return", "http://abc.mysite.net/catalogue/order/PayPalFailure.aspx");
data.Add("notify_url", "http://abc.mysite.net/catalogue/order/PayPalNotify.aspx");
HttpHelper.RedirectAndPOST(this.Page, "https://www.paypal.com/cgi-bin/webscr", data);
public static void RedirectAndPOST(Page page, string destinationUrl, NameValueCollection data)
{
string strForm = PreparePOSTForm(destinationUrl, data);
page.Controls.Add(new LiteralControl(strForm));
}
i am interested to know is there any web service paypal offer as a result we can use that and we can pass user and cart data to paypal by calling their web service as a result we can stay in our web site page and do not have to push user to paypal page.
basically i am looking for a way to pass information from my web site to paypal web site internally or silently by using their web service. so just redirect me to relevant paypal page or article which guide me how to use paypal web service if any exist.
please guide me. thanks
tbhattacharjee
|
|
|
|
|
Yes, you can definitely do this. I recently did a fairly complex checkout process involving initial charges and setting up recurring payments (subscriptions) while hosting all pages and using API calls. Check out PayPal Payments Pro .
However, IIRC, this is available only in the US, Canada, and UK.
|
|
|
|
|
Look at the various options on PayPal's site
PayPal Developer Documentation - PayPal Developer[^]
PayPal Payments Pro is what you need but as said only available in certain locations. Please also bear in mind additional security aspects you will need to consider.
|
|
|
|
|
Hi All,
I develop an ASP.Net Web Application (Classic) .Net-framework 4.0 and every thing ok, but when publish the application on IIS and open the login page some and click the login button this error shown some times:
"could not load file or assembly system.windows., Version 2.0.5.0, Culture=netural, PublicKeyTocken=7cec85d7bea7798e or one of its dependencies. The system cannot find the file specified"
Please let me know hot to solve it and what is the reason?
Thank All
|
|
|
|
|
Check the application pool in IIS, it will be pointing toward .net 2 framework pool. If you already have application pool with .net 4 framework associate it else you have to create a pool for .net 4 and then associate it.
Ashwin Shetty
|
|
|
|
|
Hi,
I'm sure the application pool is framework 4.0 and all settings on the IIS is correct.
please let me know other cases.
Thank You
|
|
|
|
|
Check your web.config if you have any setting in it. Also .net 2 and 4 should be running in two different pool else only one which starts first will get started.
Ashwin Shetty
|
|
|
|
|
Hi,
I was checked the web config and nothing found, also i check the IIS the both App Pool for 2 and 4 is started and also the same issue.
I don't know the reason for this, do you have another scenario to check.
Thank You
|
|
|
|
|
|
Hi,
I try to solve it using the Patch from this link which provided by you,
Update for the .NET Framework 4: March, 2011[^]
but it doesn't work when click the download link.
Can you provide me another link to download it?
Thank You
|
|
|
|
|
|
hi,
we download the update from the Microsoft center but still the problem exist.
do you have other solution ?
thank you
|
|
|
|
|
Try installing the same version of .NET as you have on your development PC.
Or just install 4.6.2[^], which is the latest version.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
Can you describe the issue cause to me, i need to solve it and work on framework 4.0 and I can't upgrade to framework greater than 4.0 because I use a third party tools which work only on framework 4.0.
If we solve it this will good, otherwise we need to upgrade all used tools.
thank you
|
|
|
|
|
As I said in my first reply, it's an issue with portable class libraries (PCLs). The 2011 update allows PCLs to locate the appropriate runtime versions of the v2.0.5.0 files.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
zead jalil wrote: could not load file or assembly system.windows Are you referencing anything in System.Windows? Since it is a web app, you shouldn't be. Look in your references and make sure all dlls are in the bin folder that need to be.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
really I didn't use any windows dll, and I don't know the reason and try all possible solutions such as fix framework 4.0, and many solution I got it from research.
|
|
|
|
|
Thank you very much, This Solve my problem.
|
|
|
|
|
Great! Glad to hear it.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
sorry to post this issue may be in wrong category but please some one tell me what is code coverage feature come with IDE ?
what is the benefit of code coverage feature ?
whose responsibility to use code coverage feature ? developer responsibility or tester ?
tbhattacharjee
|
|
|
|
|
It's for your unit tests, it shows you how much of the code you are executing during your tests, and which bits of code are not being tested which allows you to expand your tests in order to ensure you test everything.
|
|
|
|
|
New to MVC
I want to add a Login button to my home page that mimics the built in login on the menu bar.
Just want to give the user an option.
Thanks
modified 16-Jan-17 1:35am.
|
|
|
|