Saturday, October 29, 2016

Bitcoin or Bitpay

Its quite long time i havent blog bout work

Recently was working out with bitpay api. Below are the rules that must follow

1. create separate key (private and public) for testnet and livenet
2. create also separate sin for testnet and livenet (this must be generate by using each own key)
3. create separate token for testnet and livenet and must immediately pairing the token on website:
testnet =
livenet =

4. Now you ready to have api connection to any action.

To work with bitpay/bitcoin, please always download their latest version of library: as my case in php

Place it in anywhere in you public_html or project folder in localhost.

In my case, i create separate class to call the library. and another php file to call this class.

For the step of 1,2 and 3 above you can follow these:
Name of the file same as the step. Step 1 follow 001.php and goes on...

Example error message:
1. Unauthorized sin - This mean, the combination of public key,private key, sin and token are wrong. Eg: testnet private key for livenet token.. this so wrong.

1. From library when there is an error, it will just blank page. This in my case, not sure about others. Solution or the cause of the issue is here:
throw new \Exception($error_message);
throw new \Exception('Error with request: no data returned');
So instead of throw error. i just put return the error message. Eg:
return $body['error'];
return $error_message;

2. when create a token, use this array:
'label' => 'Payout Facade',
'facade' => 'payroll',
'id' => $this->sin,
You dont need to pass the pairingcode, as it will generated when u run this function. And please include the facade that you need it for.

3. To create dummy testnet and livenet bitcoin address, you can try use this website. You can create as many as you want.
Step: dashboard > crate fowarding addresses > "Address to foward to" (use the same from "Destination Address"), Network (Bitcoin Testnet for testnet) > click button "create address" > done.

4. To test the postback or IPN, use Fiddler2 (need to download this). Inside it go to tab "Composer" > put ur url of the postback (notificationURL), and the "Request body" put the example responce from them > then click Execute button > Done

Pretty much that it.. im still in the middle of developing it.. still strunggle... above are still in theory.. hope it succeed. Wish me luck!

Keyword: Bitcoin API, Bitpay API, createToken, createPayout, deletePayout, Batch Payout.

Thursday, May 26, 2016

Kunak / Tawau Sabah - Ikan Bilis Fresh

Jadik orang Laut Kitak! I took 1 week off. Sudden plan. Erk.. Thank god i have supportive team. Leave approve immediately.. Hehe, Ikan bilis fresh.. Sapa mauk? Jual murah sajak. Telefon la kami. Igal dance.. The song play on and on in my head.. Nice song. Visit fisherman village. Have a night  life there.. Can call me for the package. Place to stay, Meal 5 times a day, Boat trip with fisherman! Cheap cheap one. Transfer from Tawau Airport can be arrange.

017- 7783979

Redang Island With Friend and Love

Redang Island is another crazy awesome island. You dont have to go far.. It just here.. In Malaysia itself. Im so gonna go again. But next time with flight ye sayang! Alrite the trip with my college. They all plan it like a year start the moment i join the company. Its keep delay, time not rite, place not rite. So this time, we so gonna make it happen. We must! We all agreed this Labour day, 3D2N, Redang Island. We booked the hotel pretty last minute, 1 month before. Luckily we manage to get one, which is left the expensive one.. fuhhh.. No matter what, we so gonna make it happen. Then check the bus. Dem almost finish, Book NOW!, Shyam was like crazy.. hehe.. Ok.. We got the hotel, return bus, all set.. left is counting star.. 3 more days, 2 more days, 1 more day and here we are...

So much effort to make this happen, and we did it! Shyam, Kumar, Silan, Prec, Prashant, Me and Syiema. We took bus at night from KL. reach at Kuala Terengganu at 6am. Then go walk find the habour. Just 5 minute walk. Find 7e from the station bus, then walk toward along the road. Until you find the Pasar Payang signboard, just walk toward it. Then you can see sea. Since it still early, we look for restaurant for breakfast. Ask local people, inside pasar payar in second floor, there is food court. Its open very early morning. Luckily. Food before anything.

Boat are here. They are punctual nope, they are early. Thank god we dont wait until last minute. Boat stop you know you there.. ohyeaa blue color sea and white beach.. Crazy.. ohno fish just down here.. Pretty.. wait for your turn to transfer to another small boat to get near the beach. They so protective, the big boat cant get too near. And the hotel just in front us. 3D was so fast.. :(.. Back to KL its 10 hour journey.. bluek..

Are we at the Pool??

Lombok 2nd Visit

Lombok is crazy awesome.. Definitely go again and again. This time we go around the land, but ya still must spend at Gili. Best bout the second trip, we pretty much can arrange the trip better. Once landed, we immediately request for a package which is cover the taxi and the boat direct to hotel at the island. Awesome! we got pretty cheap deal. So no matter what time you arrive at Lombok Airport, you can easily arrange the package. Not need to stay overnight at the land.

This time, we stay at Gili T. We want to have more happening night life. But that not what I got.. I got much better experience. The beach are nicer, we can snorkeling just in front our hotel.. The fish the coral.. jaw drop.. crazy. We try every restaurant there.. We try komodo round the island.. the environment just nice. Its raining season.. dem.. I dont remember but i think its the chinese new year leave we when there..

We have 3 night at Gili T, then we check out and stay at Selong Belanak. The place actually best for surfing. We book for 2 night there. We dying to learn to surf but endup its not the surfing season. Facepalm!.. So we stay just for one night. Head to Kuta Lombok for 2 more nite. Kuta, they have a lot of beach. You need more day to really enjoy each beach. Too bad we dont have much time. As always she want to have time for shopping.. Huhu.. Kuta or anywhere else, they dont have much to shopping. Mataram the main city are the place, but still nothing much. We there just to buy some Indonesia traditional facial product, medicine, etc.. One more attractive place are the Suluk Village, its near Kuta. Nice place and i think a must visit. The Ayam Taliwang.. arghhh we still could not find the delicious place as the first time we went there.

Monday, January 4, 2016

Koh Samui

Awesomeeeee.... Beach.. Party.. Hehehe.. About the trip. We have 4 day leave.. Thinking of Koh Samui seem not enough... Why? Becoz its a island, far from the land. With Airasia.. almost impossible. Only 1 trip per day..We might need to stay at land before go to the island..

For Koh samui, there is a few option actually to go there. We can just take flight directly to samui with bangkok air or fireflyz.. offcoz with higher price. last time i check flight back to Kuala lumpur from samui cost us 700++rm per person. Bangkok Air were cost 900++rm.. With AA only about 300rm per person..

With AA, There is Thailand and Thailand (Island Transfer). You will never know until you look closely.. The one with Thailand, is the flight only to surat thani, which is the land. Then took urself the bus to the Donsak Pier. THen again urself took the boat to the island. 2nd option - Thailand (Island Transfer), You will purchase all together (flight+bus+boat).. This is way much better. As you know, AA always have issue with delay flight.. wth this purchase you wont miss bus/boat anymore. Because everything on them. One delay, everything will come together. not need to worry. BUt ya, the trip still crazy.. take almost 10 hours.

So here we begin, flight from kl at 4pm.. reach surat thani at 4.30pm (thailand 1 hour late from malaysia). Checkin at AA Bus counter, immediate took bus to Donsak, take 2 hour maybe. then Checkin at the Jetty wait a bit, took Ferry to Lipa Noi (Koh Samui) take about 1.30 hour. since i know we reach there at nite, scared of no transport to hotel, i bought online the transfer to hotel from a bit expensive, but its ok. as long its can secure me reach at the hotel. You dont have to worried bout it actually. The bus provided at surat thani, they have this service. They will ask you which hotel. Cost only 200baht per person to any hotel at samui.

Its a small island. but fill with many thing. Its kinda worth it, make us extend 2 more days.. We choose Lamai because its nearer to Lipa Noi pier.. on first day, the island hoping (package bought with the bus provider, cost 1500baht per person). We choose koh nang yuan (the triangle island connected with 3 island).. lunch provided.. the boat ride was crazy and it took 2 hours... Luckily its not raining. Fuh

Next day, we rent a car with driver.. but the driver bring the gf which is not professional at all.. we rent a car not taking tour with him.. probably he dont know that.. endup he left us at chaweng. we have to go back our own.. cost us 2000baht for 7hour. additional hours add 300baht per hour. We ask the driver to go around the island - From Lamai, Nathon, Maenam, Bophut, Chaweng. I never had a change go around lamai much (since the driver left! dem!) for me, the best beach would be Bophut, Chaweng.. Ask for The wharf or fisherman Village at Bophut.. and Chaweng, ask for Central Festival or Chaweng Street or Ark bar.. the extend 2 more days we stay at P&P just beside the Ark Bar beach Resort, Chaweng cost us at 5500baht. at Lamai we stay at Sand Sea & Spa Resort cost us at 12300baht. Flight return cost 1193.16rm. since we extend, we buy new ticket to kuala lumpur, cost us 6275baht..

Rest of the days just free and easy, relaxing, manicure, pedicure, massage.. nice... Back to Malaysia.. both of us having fever until new year.. Alhamdulillah..

Date Travel: 24-29 Dec 2015