This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PaymentController | |
{ | |
public function makePayment() | |
{ | |
// POST data: | |
// fromCustomerId | |
// toCustomerId | |
// amount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +josecelano is my openname (Bitcoin username). https://onename.com/josecelano |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1. Autoload the SDK Package. This will include all the files and classes to your autoloader | |
//require __DIR__ . '/php-client/autoload.php'; // Direct Donwload | |
require __DIR__ . '/vendor/autoload.php'; // Using Composer | |
// 2. Provide your Token. Replace the given one with your token | |
// https://accounts.blockcypher.com/dashboard | |
$token = 'c0afcccdde5081d6429de37d16166ead'; | |
$apiContext = new \BlockCypher\Rest\ApiContext( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1. Autoload the SDK Package. This will include all the files and classes to your autoloader | |
//require __DIR__ . '/php-client/autoload.php'; // Direct Donwload | |
require __DIR__ . '/vendor/autoload.php'; // Using Composer | |
// 2. Define BC_CONFIG_PATH directory | |
if(!defined("BC_CONFIG_PATH")) { | |
define("BC_CONFIG_PATH", __DIR__); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;## This is an example configuration file for the SDK. | |
;## The sample scripts configure the SDK dynamically | |
;## but you can choose to go for file based configuration | |
;## in simpler apps (See bootstrap.php for more). | |
[Account] | |
acct1.AccessToken = c0afcccdde5081d6429de37d16166ead | |
;Connection Information | |
[Http] | |
; Add Curl Constants to be configured |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1. Autoload the SDK Package. This will include all the files and classes to your autoloader | |
require __DIR__ . '/php-client/autoload.php'; | |
// 2. Provide your Token. Replace the given one with your app Token | |
// https://accounts.blockcypher.com/dashboard | |
$token = 'c0afcccdde5081d6429de37d16166ead'; | |
$apiContext = new \BlockCypher\Rest\ApiContext( | |
new \BlockCypher\Auth\SimpleTokenCredential($token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Following the guide found at this page | |
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
echo "\r\nUpdating system ...\r\n" | |
sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa | |
sudo apt-get update | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final class GetProjectsController extends Controller | |
{ | |
/** | |
* @var QueryObjectFactory | |
*/ | |
private $queryObjectFactory; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
printf("%sGit pre-commit hook %1\$s", PHP_EOL); | |
$projectName = basename(getcwd()); | |
exec('phpunit --configuration phpunit.xml', $output, $returnCode); // Assuming cwd here | |
if ($returnCode !== 0) { | |
$minimalTestSummary = array_pop($output); | |
printf("Test suite for %s failed: ", $projectName); | |
printf("( %s ) %s%2\$s", $minimalTestSummary, PHP_EOL); | |
return false; // exit(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -v | |
# Set directories permissions | |
# Set Apache user as group owner for directories which require write perms | |
# This script is running as jenkins user. Jenkins should belong to www-data group | |
find ./vendor/orchestra/testbench/fixture/storage -type d -exec chgrp -v www-data {} + | |
find ./vendor/orchestra/testbench/fixture/storage -type d -exec chmod ug+rw {} + | |
find ./vendor/orchestra/testbench/fixture/bootstrap/cache -type d -exec chgrp -v www-data {} + | |
find ./vendor/orchestra/testbench/fixture/bootstrap/cache -type d -exec chmod ug+rw {} + | |
chgrp -v www-data ./vendor/orchestra/testbench/fixture/bootstrap/cache/services.php | |
chmod ug+rw ./vendor/orchestra/testbench/fixture/bootstrap/cache/services.php |
OlderNewer