Showing posts from October, 2017

Powershell - Creating and unpacking a zip (archieve file)

Here are some way to create an archive

Compress-Archive -Path .\bin\$targetBuild\* -DestinationPath .\$

To add to this archive, use the -update parameter

Compress-Archive -update -Path .\deployControlService.ps1 -DestinationPath .\$

To unzip your achieve, use the following command

Expand-Archive -Path .\ -DestinationPath $servicePath

10 min Android Braintree (Paypal) integration

Braintree is a paypal payment portal which provides sdks for android, ios, .net core to help you pay via paypal.

How you do it? There are 3 main steps to do it

1. Add BrainTree Drop-In
2. setup onActivityResult
3. Add Braintree activity to your manifest file.

1. Drop In

Drop-in is a quickest way to enable paypal in your app. It handle UI and application from.
Say a user clicks on "pay using paypal", it should run the following codes

private void OpenDropIn() { DropInRequest dropInRequest = new DropInRequest() .clientToken(mAuthorization) .amount("1.00") .requestThreeDSecureVerification(Settings.isThreeDSecureEnabled(this)) .collectDeviceData(Settings.shouldCollectDeviceData(this)) .androidPayCart(getAndroidPayCart()) .androidPayShippingAddressRequired(Settings.isAndroidPayShippingAddressRequired(this)) .androidPayPhoneNumberRequired(Settings.isAndroidPayPhoneNumberRequired…

git discard un-committed changes

Easy way to do this, with sourcetree, is to open up terminal and then run the following command

git clean -df git checkout -- .