SDK

Integrate crypto payments into your .Net applications with AtomicPay

Integrate crypto payments into your .Net applications with AtomicPay

If you have been following along, you may have noticed that I am discovering the cryptocurrency space lately. Today I want to introduce you to AtomicPay, a crypto payment processor that uses a different approach than traditional processors.

Why AtomicPay?

I have been thinking quite some time about how one can implement crypto payments into apps, be it desktop or mobile apps. Ever since then, it was clear for me that I need a solution where the payment happens between me and the customer directly, but all the infrastructure to handle invoicing etc. has to be handled from the outside.

Traditional payment processors often provide their service with a custodial wallet – you do not have control of the keys, so it is not really your wallet, just the grant to use it. Processing incoming transactions to this custodial wallet are routed through another wallet of the service, where those processors take their fees and process the reduced payment to your custodial wallet.

Security and Privacy

When it comes to crypto payments, there is always one problem: the balance between the ease of using and security/privacy. If you are looking at some other non-custodial services, they are providing payment processing by just using a single wallet address. Even if this is the easiest way to use crypto payments, it has some fundamental issues:

  • makes it way too easy to monitor transactions of a business/merchant entity
  • easy target for man-in-the-middle attacks
  • accountability issues (imagine 10 people paying the same amount, but for different products at nearly the same time)

Do you really want to put you and your customer/user at this risk? Surely not!

AtomicPay’s different approach

AtomicPay follows a different route. It provides an invoicing infrastructure that is easy to use, but payments are directly between merchant and customer.

It relies on the well established Electrum wallets. Never used any Electrum wallet before? No worries, AtomicPay helps you to initialize the wallet with step-by-step tutorials.

Electrum wallets are (optionally) SegWit-enabled, HD (hierarchical determistic) wallets. This means that for every incoming transcation, a new address is generated from your keys. Even though you could do multiple times, every address should be used only once. This makes attacks from the outside significantly harder and protects both you and your customer/user.

AtomicPay itself only has reading access – it can watch transactions, but never initialize any transfer out of the wallet of your funds. Atomicpay is able to calculate new valid receiver addresses for your Electrum wallet because of the BIP 0032 protocol by using your public key, which is the only thing you need to insert into their website.

AtomicPay features

AtomicPay provides quite a bunch of features:

  • on-the-fly PayUrl generation (QuickPay)
  • monitoring of incoming payments
  • notifications via Mail and Webhook
  • free-to-use REST API
  • very low fees
  • and more…

Introducing AtomicPay.Net SDK

As AtomicPay convinced me to be a valuable solution for crypto payments, I started to create a new library for their API. The SDK makes it very simple to call all endpoints and to integrate it into your .NET applications. The library is available on Github and as NuGet package. You’ll find informations on how to use the library on Github as well. My repo will also be forked into AtomicPay’s Github account soon and gain a bit more visibility this way.

What’s next?

The library is only the first step and lays the groundwork for more things to come, namely:

  • Webhook code sample with Azure Function and Notificationhub
  • Xamarin component for AtomicPay
  • Administration app for merchants (iOS and Android)

If you have ideas or questions on the library, feel free to ping me on the well known social accounts or leave a comment under this post. As always, I hope the library will be helpful.

Until the next post, happy coding, everyone!

Disclaimer: I am contributing to this project with code written by me under the MIT License. Future contributions may contain their own (and different) disclaimer. I am not getting paid for my contributions to the project.

Please note that none of my crypto related posts is an investment or financial advice. As crypto currencies are volatile and risky,  you should only invest as much as you can afford to lose. Always do your own research!

Posted by msicc in Crypto&Blockchain, Dev Stories, 0 comments

Bing Maps SDK on Windows 8 (W8CP)

With the release of the Windows 8 Consumer Preview, it was only a matter of time that Microsoft releases some new SDKs to us developers. We are starting with the Bing Maps SDK.

Bing Maps SDK for Windows 8 Metro style apps

Screenshot (32)

Microsoft´s Bing Maps team released a new SDK for Windows 8. You can use the SDK free and unlimited during the preview period.

The new SDK supports Java by using the AJAX v7 controls, and provides all standard items like map types, pushpins, infoboxes and tile layers. Additionally there is now a venue Maps module. At the moment there are still some missing bits like directions, traffic and overlays. Your maybe previous used REST APIs will still work and help you to use more features. If you want to learn on an example, you can watch this site.

Of course you can also use C#, C++ or Visual Basic to create apps that are using the SDK. The SDK now supports client vendor rendering as well as full hardware acceleration.You can also use Aerial and  Bird´s eye view and traffic overlays  within you app. Some features are in this early stage US only. You can learn on an example on this MSDN page.

Getting started…

OC course, you need to download the SDK to get started overall:  http://visualstudiogallery.msdn.microsoft.com/0c341dfb-4584-4738-949c-daf55b82df58. You can also use the VS11 Extension Manager to download the SDK.

Secondly, you will net a special “Metro style  apps (BETA) key” to use the SDK within you apps. Get your key at www.bingmapsportal.com .

If you want to read a lot more about using Bing Maps within you Metro styled apps, head over to the documentation sites at MSDN.

Posted by msicc in Archive, 0 comments

WPDEV on W8CP: How to install the Windows Phone SDK

Yesterday I was all day playing around with the Windows 8 Consumer Preview (W8CP) as many of us.

Screenshot

Today I wanted to get a bit more serious and tried to install the Windows Phone SDK.

Once downloaded from App Hub, I clicked “Install”, and waited for the SDK to complete  . Install went trough, and I was waiting for opening my current project.

But then I was shocked by numerous error messages, all of the regarding XNA plugins and updates. So the dream was over. The SDK does not support W8CP.

screen

I am a very Metro-addicted man, so I was searching for a solution. On Twitter I was tipped by @nikovrdoljak to one part of the solution.

The errors are caused by Games for Windows – LIVE Redistributable

XNA Game Studio installs a version of the Games for Windows – LIVE Redistributable behind the scenes.  Some older versions of the Games for Windows – LIVE Redistributable attempt to install and use a file that is being installed by Windows 8, and the older versions of the redistributable are not compatible with the newer version of the file that is installed by Windows 8.  Newer versions of the Games for Windows – LIVE Redistributable are compatible with Windows 8, and if you pre-install the new redistributable before installing XNA Game Studio, setup will recognize that it is already there and use the new version instead of trying to install the old version.

The reason this issue also impacts the Windows Phone SDK 7.1 is that this SDK installs XNA Game Studio behind the scenes, which in turn installs the Games for Windows – LIVE Redistributable behind the scenes.

So where to download the actual version? Let´s check this later. I followed the steps shown on Aaron Stebner’s WebLog. But that was not all.

I think more WPDev are willing to try, so here is a checklist:

  • uninstall all parts of the Windows Phone SDK – Note: there are some bits left after you use the automatic install, so you have to uninstall remaining parts of the SDK manually
  • do a reboot (that thing you do not want to do once you started playing around with W8CP). Don´t worry, it is faster as on Windows 7 (on my 2 year old ASUS under one minute).
  • go to the Games for Windows download page, which you can find on this page: http://www.xbox.com/de-DE/LIVE/PC/DownloadClient. Replace the “de-DE”-part with your regional language code, for the US p. e. “en-US” to download the correct version of the redistributable.
  • start installation
  • in the middle of the installation, the UAC asks you to allow the installation. Now click on “change, when this message appears” (the original wording might be slightly different, I translated it from German).
  • pull down the switch to set Windows to not ask you anymore (yes, even if this is not recommended)
  • now let the installation of Games for Windows –LIVE Redistributable finish.
  • finally, start installation of the Windows Phone SDK. This time, it takes a little longer than before (probably due to the now working install parts)
  • if you want to, turn the UAC on again (control panel/more settings/users/settings for user access control)

Congrats, you installed the Windows Phone SDK, but…

you still have to deal with some points:

  • the SDK currently works only with Visual Studio 2010
  • the emulator does not work, so you have to debug on device
  • the updated Windows Phone SDK 7.1.1 (which is only to have a look, not the final version), might afford additional steps

For me it only worked with above mentioned steps. If you had another steps to do or additional information, leave a comment to discuss.

happy coding on Windows 8, everyone!

Posted by msicc in Archive, 6 comments