This file contains hidden or 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 | |
require '../../vendor/autoload.php'; | |
define('AMQP_DEBUG', false); | |
$conn = new \PhpAmqpLib\Connection\AMQPStreamConnection( | |
'localhost', '5672', 'guest', 'guest', '/'); | |
var_dump(count($conn->channels)); | |
$ch1 = $conn->channel(1); | |
var_dump(count($conn->channels)); | |
$queue1 = 'q1'; | |
$ch1->queue_declare($queue1, false, true, false, false); |
This file contains hidden or 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
// create a new debit card recipient | |
$token = \Stripe\Token::create(array( | |
'card' => $this->debit_card, | |
)); | |
$recipient = \Stripe\Recipient::create(array( | |
"name" => $this->name, | |
"type" => "individual", | |
'card' => $token->id |
This file contains hidden or 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 | |
// put your autoloader path here | |
\Stripe\Stripe::setApiKey('secret'); // put your secret key here | |
$account = \Stripe\Account::create([ | |
'managed' => true, | |
'email' => '[email protected]' | |
]); |
This file contains hidden or 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 | |
// include stripe PHP lib path here | |
// set up API key | |
\Stripe\Stripe::setApiKey("your API key here"); | |
$managed_account = \Stripe\Account::create([ | |
'managed' => true, | |
'email' => '[email protected]' | |
]); |
This file contains hidden or 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
$payout = \Stripe\Payout::create( | |
[ | |
"amount" => 1000, | |
"currency" => "usd", | |
"destination" => 'ba_1ALJm3HxNV2Q6NSzVM3yHukM', | |
], | |
[ | |
'stripe_account' => 'acct_1ALJlyHxNV2Q6NSz' | |
] | |
); |