this.from('yesbee://0.0.0.0:10000/sendEmail') // use http://
.to('smtp://localhost');
$yesbeeConnector = Yesbee::factory('192.168.1.10', '10000');
$yesbeeConnector->post('/sendEmail', array(
'anu'
));
$exchange = $yesbeeConnector
->exchange(array(
// body
))
->header('da', 'da')
->send('/sendEmail');
this.from('http://localhost:3000')
.to(function() {
// process billing
})
this.from('direct:digitalItems')
.to(function() {
// process digital items
})
$yesbeeConnector = Yesbee::factory('192.168.1.10', '10000');
$yesbeeConnector->send('direct:digitalItems', array(
'anu'
));
$exchange = $yesbeeConnector
->exchange(array(
// body
))
->header('da', 'da')
->send('/sendEmail');
$yesbee = Yesbee::factory('192.168.1.10', '10000');
$yesbee->post('sendEmail', array(
'anu'
));
$yesbee->sendEmail(array(
'anu'
), $headers);
$exchange = $yesbee
->exchange(array(
// body
))
->header('da', 'da')
->send('/sendEmail');
class Connector {
public function __call($method, $args)
{
return call_user_func_array(array($this, 'post'), array('/'.$method) + $args);
}
}
$client = Yesbee::facetory('http://localhost', 4000);
$client
->post('/checkout', array(
'key' => 'value'
))
->header('key', 'value')
->header(array())
->send();
$client
->exchange(array())
->header('key', 'value')
->header(array())
->send('/checkout');
use Guzzle Norm use this library
- component mongo: (optional)
- access config from context
this.context.config('anu.gemes');
from manifest.json
{
"config": {
"anu": {
"gemes": "xxx"
}
}
}
open /initiate?store_id=xyz&api_token=asd420fE&amount=123456
REQ:
GET /checkout.json?store_id=xyz&api_token=asd420fE&amount=123456
Content-Type: application/json
RESP:
Body:
{
"refnum": "xyz:asd420fE"
"store_id": "xyz",
"amount": 123456,
"fee": 12345,
"total": 123456 + 12345
}
- Generate QRCode based on data
- Build socketio connection to yesbee
xxx xxx xxx
socketio::emit('wait-for-payment', {
"refnum": "xxx"
})
yesbee akan simpan
... ...
REQ:
POST /checkout/:refnum.json
{
"refnum": "xxx"
"store_id": "xxx",
"amount": 123456,
"fee": 12345,
"total": 123456 + 12345,
"issuer_data": "xxx"
}
RESP:
Status Code:
200 OK
emit('paid', {})
REQ:
GET /initiate
# Content-Type: application/json
Body:
{
"store_id": "xxx",
"api_token": "xxx",
"amount": 123456
}
RESP:
Body: