ASP.NET Core – Easy Transition of Bower to NPM

UPDATE (Oct 16, 2018):  I now rely on Libman for my front end management.  I use its 3 different providers to grab the libraries off of cdnjs, unpkg (supposed to include all npm) and filesystem for local files.  See post:  Using Libman Providers to Coral Front End Libraries

I love me some Bower, even with the shadow looming over it that it’s time is done.  Recently, though, it started to do something weird with just restoring/replacing packages that really began to cause problems with my project (and make for some seriously messy 99* commits).

I can do simple task running, etc but still very much a noob to packaging.

Here was my easy solution for removing Bower and switching over to NPM (and accessing those packages through Views).…

.NET Core with PayTrace (Mime Type Fix)

This year I am re-writing my previous payment solution (from PHP to .NET) and first on the project list is credit cards.  We are using PayTrace and their client-side encryption as to not have to worry about PCI Compliance.

I’m to the point where I have a Pre-Payment model with all the fields needed to send via JSON.  I also have a method to request a token for sending (uses demo username and pass) and a test PEM file I downloaded from the PayTrace site.  I also got the webpage scanning credit cards, and I hit submit and.. I get this:

XML Parsing Error: no element found

This is appearing in the console of Inspector in Firefox.  Turns out this a generic error Firefox throws out when it’s expending a file but gets nothing.

My path’s are correct, but the “public_key.pem” file is not attaching to my post.   The problem?  MIME-type.…

Nextdoor: The Rise of a New Social App

Two weeks in deep into Hurricane Harvey, I am one of the VERY lucky to stay dry.  One thing that goes unmentioned, though, and this goes especially for those displaced – is the phenomenal amounts of anxiety one experiences going through a hurricane. The preparation.  Landfall.  The wait.  The recovery.  I can’t imagine evacuation…  I think I spent half of Saturday in a bathtub, until I resigned that all the “tornado warnings” were a lie and walked out to survey my front yard.  That’s when a neighbor told me one just hit a couple miles from me.  Back to the bathtub I went.

My phone never shut-up that weekend.  I heard helicopters non-stop over my area at midnight.  When do you know its close?  Does it mean “me” or ALL of Houston and where does my area fit in that? I don’t live in the loop!  Friends quickly told me the place to go:  Nextdoor.…

Securing AS400 / iSeries (Comodo Free SSL)

Enabling SSL certificates with Comodo’s Free 90 Day trial SSL Certificate.  This process enables you to secure both web services, login, and SSL across all other servers/services on the AS400 / iSeries.

Note:  If you are replacing/renewing your cert and something goes wrong, do not be afraid to delete your certificate store (if this is your only cert) and start fresh with this tutorial.  I’ve done it twice, now, as the key in store had trouble matching the new cert, etc…  I deleted certificate store, followed my own tutorial and was up and going in minutes.

PHP/Curl SSL Certificate Error with Payeezy

As I work toward syncing our as400 to our payment gateway, I’ve encountered an error both in PayTrace and Payeezy sample codes, generally when making a JSON post with Curl in PHP.

The error:

ssl certificate problem: self signed certificate in certificate chain

Almost ALL documentation / research on this suggests you turn off Curl verification (CURLOPT_SSL_VERIFYPEER off)  and yes, it works, but it’s just not an option when I’m trying to secure my server for payment transactions.…

PayTrace Client Side Encryption (PHP / IIS)

This is a quick for-developers-only guide of how to get your PHP/JS code (Windows) talking to PayTrace’s API.  I chose the Client Side Encryption as being our first time out, I wanted the least amount of strictness in PCI compliance.   This guide assumes you know PHP, JS, JQuery, a little of what an API does, enough to paste some JSON together and of course your HTML, CSS, etc.   You’re a developer, you have all the code provided open source, but this is a quick A-B-C of what code I used and how I got it working on Windows (IIS7) and hurdles I ran into.

All code here is readily available on GitHub, but if you’d like my version of it, download it on my Gist.…