Check Paypal account balance and transactions via C# API

How to use Paypal-API in CsharpAfter we had a look at how to sent push notifications via C# recently, there are plans for the next C# article today. This time it’s about how to read account balance, sales and transactions and other things of a Paypal account.
First some basic information. Although Paypal is an “online account”, in many ways it differs from an online (giro) account of a “classic” bank. For example, Paypal does not support the Homebanking Computer Interface (HBCI) to retrieve account information or send payments. Instead, Paypal offers different APIs (REST, SOAP, + SDKs, …), which differ not only in structure and technology, but especially in the range of functions. For our purposes we will use the so-called “NVP / SOAP API” and connect to it […]

How to send push notifications in C#

Push-notifications-in C-SharpIn today’s article, we’ll look at how to push notifications out of C# onto smartphones or other devices. It does not matter if it is an Android or an Apple / iOS device. But when do you need such functionality?
For example, I run a few niche sites (affiliate websites) with which I earn monthly through affiliate programs. However, the revenue reports have to be picked up proactively in almost all affiliate programs. So I wrote a small C# client, which regularly downloads the reports and sends me a push notification for new sales. That’s just one of many uses and I’m sure you’ll think of a few more. But now back to the topic.
Selection of push platform
For a quick and easy integration of the push functionality in […]

How to generate Swiss QR Code in C# and VBA

Swiss QR Code in C-Sharp and VBAToday, we are looking into the field of business computer science. Since end of April, SIX has released the specification for the new Swiss QR Code according to ISO 20022. The Swiss QR Code is an integral part of the new Swiss deposit slip, the so-called QR invoice, which shall be implemented by all companies by mid-2018 at the latest. The Swiss QR code is placed in the so-called “number part with QR code” of the QR invoice.
In the following, we will discuss how the Swiss QR code can be generated using C # or VBA. To do this, we use the free QRCoder library, which I developed almost 4 years ago and to which recently added the Swiss QR Code. One more thing […]

.NET Core – gdiplus.dll not found in Linux

A few days ago there was an issue raised in my QrCoder project. It was reported that the code would not run under Linux, as the following error message would occur:

Unhandled Exception: System.TypeInitializationException: The type initializer for ‘System.Drawing.KnownColors’ threw an exception.
—> System.TypeInitializationException: The type initializer for ‘System.Drawing.GDIPlus’ threw an exception.
—> System.DllNotFoundException: Unable to load DLL ‘gdiplus.dll’: The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at System.Drawing.GDIPlus.GdiplusStartup(UInt64& token, GdiplusStartupInput& input,
[…]

However the error message had its origin not in my QrCoder, but in the interplay of the .NET core framework with the GDI Plus library. The .NET Core Framework tries to access “gdiplus.dll” when accessing “System.Drawing.GDIPlus”, which is simply not available on Linux.
First solution approach
First, ensure that GDI+ is installed at all. This can be done with the following shell command:

sudo apt-get install libgdiplus

If libgdiplus is installed, however, another important step is missing …
Link libgdiplus for .NET Core
Because the […]

How to download SSL/TLS certificates in C#

How to download SSL and TLS certificates in CsharpThis article is about how to download (or save) SSL/TLS certificates from any server by use of C#. Although nowadays certificates can be stored quite simply from the web browser, this is always associated with quite a few clicks. And at the latest when you want to store certificates from mail servers, etc., i.e. systems that can not be addressed directly in the web browser, a programmatic solution, as shown in this post, may be the easier way.
All in all, I would like to introduce two variants today. One variant, which works only for HTTPS connections and another variant, which works for all TCP connections (like mail servers, etc.).
Download HTTPS/SSL certificates in C#
The first addressed solution works only for HTTPS connections […]