|
|
Now currently what is happening is ..
I tried to publish the backed up project file I had saved elsewhere in a different directory and it can be published successfully without this problem! So I copy the whole project folder to my current working directory, replace the existing one, build and publish .. the problem remains. Why is that?
I've set my references to Copy Local True.
Let me check out your links. Thanks!
|
|
|
|
|
hi friends,
If you are the POS developer you'd know that if the customer want to pay using EFT I have to have hardware and banking connection over the wire.
How do I make my POS application accept EFT payments?
Are there 3rd party tools that does it?
Are there any FREE 3rd part tools for it?
I was wondering are those 3rd party components provide an API to their .DLLs so that I could program it?
PS- Im using winApps with C# but I have not used MS POS libraries so far
thanks
|
|
|
|
|
You would need to find a bank transaction processing company in your area THAT YOU TRUST(!!) to handle the payments for you.
NONE of them are free.
|
|
|
|
|
To add to what Dave said: Never, ever, accept code from a insecure website to handle anything to do with real money.
You do not know who is giving you the code, you do not know what it does, you do not know that it places the monies correctly into the appropriate account, without passing the details to any third parties.
Only get such code from reputable card transaction service companies - the scope for fraud otherwise is far too large. And remember, you personally could be liable for any monies lost if your action is seen to be negligent - which getting your code from a public forum would most certainly be!
Would I trust a free API? Well, let me put it this way: would you trust me with your bank account details?
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
I've downvoted you. It's not personal but I think your remark is wrong;
First, he did not state that one should be careful when using "open source". You might mean "free software", but that's not the same as open source software.
Second, there is no way that an assembly that comes without sourcecode is "more trustworthy" than anything that comes with sourcecode. That is not logical.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Free software != Open source
Your statement is nonsense.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Member 10597988 wrote: How do I make my POS application accept EFT payments?
That is more complicated that it sounds but basic steps are
1. Determine the stores bank and insure that the bank will accept EFTs into the business account.
2. Find a service provider that will deal with the bank. And determine cost.
3. If both of the steps above allow you to move ahead then....
4. Find a check reader (the hardware). Find the API and write a code layer to deal with that.
5. Find the API for the service provider (step 2). Write a code layer to deal with that.
6. Certify with the service provider. This insures that 4/5 work that the service provider will now accept payments.
7. At least in my experience there was also an expectation that the image from the hardware was reviewable in the POS application.
Impacts to the above are the transaction volume that the store already does. More volume means more negotiating room both for per transaction fees and what hoops the bank will dance through.
I have found it a good practice to write a simulator for the service provider API. That is because they almost never provide a full range of error possibilities. Sometimes they have no way to test at all. And I have never found one that allows for disconnect errors.
Member 10597988 wrote: Are there any FREE 3rd part tools for it?
Depends on what you mean but basically no. You will pay for the hardware. And you will pay for the service provider. Not sure if you will need to pay a fee for the certification process. The APIs for the hardware and service provider are free. I didn't find the happy path usage of either one difficult. The difficulty is in learning about the specifications in the first place and dealing with the error cases.
|
|
|
|
|
I need to know the syntex to read and write xml attributes
briefing_text txt_id="" headline_id="" anchor="" pos=""type=""/>
/briefing
|
|
|
|
|
Which xml system are you using?
XmlDocument, XDocument, XmlReader
It makes a difference in the answer you'll get.
|
|
|
|
|
|
|
Hi,
I am working on a shared-add-in for office applications with c#. The add-in should convert Office Applications, which are currently open, to pdf.
In the helps, that I've found for pdf, you always have to insert a sourcePath and exportPath. But I want, that the Office Application, that is currently open, is taken and converted to pdf. How could I do this?
I would be very glad and grateful, if you could help me by this.
Please Help(:
Thanks
|
|
|
|
|
Member 10591931 wrote: But I want, that the Office Application, that is currently open, is taken and converted to pdf. How could I do this? Unless you find a library (or write one) that does it in-memory, you can't. As an alternative, there's a TEMP directory to where you can convert if you don't want to bother the user with saving it in a particular location. You can then read it's contents from there (and delete it when done).
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Its not giving the true results:
class Program
{
static void Main(string[] args)
{
string check = "324214234\r\n";
RegistryKey regKey = Registry.LocalMachine.CreateSubKey("SOFTWARE\\MyRegKey\\Settings");
regKey.SetValue("ReceiveSplChar", @"\r\n");
string value = regKey.GetValue("ReceiveSplChar").ToString();
if (check.Contains(value))
Console.WriteLine("TRUE");
}
}
Please fix this issue.
|
|
|
|
|
When you set the value, you use an @ before the string. This tells C# to treat backslashes as backslashes rather than escape characters, so you are writing four characters to the registry, not two as you intended.
What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.
|
|
|
|
|
You have already used the double backslash and the @ prefix in two of your strings, so you should be able to see what is wrong with the first one.
|
|
|
|
|
Have a read of this
String Literals C#[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
To add to what the others said, don't use the registry unless you absolutely have to: access is restricted in "modern" OS's and likely to become more so, not less.
Unless there is a very, very good reason, you are much better off using application config files, or storing information in the folders intended for that. This might help: Where should I store my data?[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
<pre>using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Applica
{
class Program
{
static void Main(string[] args)
{
DirectoryInfo da = new DirectoryInfo("C:\\Folder");
FileInfo[] Arr = da.GetFiles();
if (Arr.Length == 0)
{
throw new InvalidOperationException("No files found.");
}
FileInfo ap = Arr[Arr.Length - 1];
long Totbyte = ap.Length;
string filePath = ap.FullName;
Console.WriteLine("Total Bytes = {0} bytes", Totbyte);
string temPath = Path.GetTempFileName();
byte[] data = File.ReadAllBytes(filePath);
File.WriteAllBytes(temPath, data);
decimal[] arry = new decimal[Totbyte];
for (int count = 0; count < data.Length; count++)
{
arry[count] = data[count];
}
byte[] data2 = new byte[Totbyte];
for (int count = 0; count < arry.Length; count++)
{
data2[count] = (byte)arry[count];
}
if (data2.Length != data.Length)
{
throw new InvalidOperationException("Wrong length!");
}
for (int index = 0; index < data.Length; index++)
{
if (data[index] != data2[index])
{
throw new InvalidOperationException("Data has changed at index " + index);
}
}
string filePath2 = Path.Combine("C:\\check", Path.GetFileName(filePath));
File.WriteAllBytes(filePath2, data2);
data = File.ReadAllBytes(temPath);
data2 = File.ReadAllBytes(filePath);
if (data2.Length != data.Length)
{
throw new InvalidOperationException("Wrong length!");
}
for (int index = 0; index < data.Length; index++)
{
if (data[index] != data2[index])
{
throw new InvalidOperationException("Data has changed at index " + index);
}
}
}
}
}
|
|
|
|
|
The decimal type[^] is 128 bits, or 16 bytes long. So 821903722 * 16, will take up 13,150,459,552 bytes, which is rather more memory than you have available. You could simplify this by reading your file in blocks and converting a block at a time. But, a more important issue is what are you actually trying to achieve, since all your program is doing, when it works, is to create a copy of the file? The conversion to decimals is totally redundant.
|
|
|
|
|
See the BinaryReader[^] and BinaryWriter[^] classes.
They can read/write files in chuncks.
If your file is a text file, see the StreamReader and StreamWriter classes instead.
.Net is limited to 2Gb for an object if I'm not mistaken. That might be the reason. ReadAllBytes does what it says: It reads ALL the bytes, so for large files, this could be an issue.
Hope this helps.
|
|
|
|
|
It is not redundant if you want to see a file in a way that looks simple. Decimal is very simple. It is kindergarten simple, which is my level in programming currently. I want to treat all files like binary. I don't want to specify type such as text. The streamwriter class is reading line by line, but that is not what I want. Is there anyway to do with binary chunks for one file?
|
|
|
|