Skip to content

Instantly share code, notes, and snippets.

@listepo
listepo / build.sh
Created September 25, 2015 07:50 — forked from patrickarlt/build.sh
ES 7 async/await demo!
babel github-es6.js -o github.js --optional runtime --experimental
@listepo
listepo / semantic-settings.js
Last active September 24, 2015 20:16
Mixin(Ember.js) for application controller/component
import Ember from 'ember';
export default Ember.Mixin.create({
uiSettings: null,
init() {
let uiSettings = this.get('uiSettings');
if (!Ember.$.isPlainObject(uiSettings)) {
throw new Ember.Error('uiSettings must be object');
}
Ember.$.each(uiSettings, (moduleName, settings) => {
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
$post = <<<POST
<?xml version="1.0" encoding="UTF-8"?>
<request>
<date>2015-01-21 15:29:52</date>
<sign>BDEA36F391B40D74BF757960B04E909E3B87BE168C376468B1A7222FDF8CF67CD20688741B30E4B9DE7F47A586502EEB6F24F8213B887ECC65107E70C6399D008ADEAF301C062CDCE87C082670192F8D79C6E23F3A53F250EEAC4EAC410E4DC524A9D42C891B849CC1709546E544F6675545EE945A7A8DEE35D1EDB2DD008EEA</sign>
<notify>
<status>true</status>
<transaction_id>573220</transaction_id>
<ext_transaction_id>918</ext_transaction_id>
<destination>
<?php
ob_start();
var_dump($_POST);
echo "\r\n----------------------------\r\n";
require_once ( __DIR__ . '/lib/N1/vendor/autoload.php');
$config = [
'apiUrl' => 'https://processingsandbox.n1.ua/',
class MyCoolProcessor implements \N1\Client\IncomingRequest\IOrderPaymentProcessor
{
/**
* @param \N1\Xml\Request\CoreReceiver\Notify $request
* @return \N1\Xml\Response\Notify
*/
public function confirm(\N1\Xml\Request\CoreReceiver\Notify $request)
{
return new \N1\Xml\Response\Notify();
@listepo
listepo / response
Created January 19, 2015 10:55
response
Response
Successful
Parametrs of response:
%Status% (varchar) true - status
%ExternalDateTime%(date "Y-m-d H:i:s") - merchant's datetime of notify
Example:
<response>
<status>%Status%</status>
<date>%ExternalDateTime%</date>
#!/bin/bash
cd ./node_modules/ember-cli-esnext/node_modules/broccoli-esnext/node_modules/esnext
npm install 'git+https://github.com/facebook/regenerator.git#45829598be68fa4cb10f86b5ca13aa7284aa6bc8'
@listepo
listepo / designer.html
Created December 22, 2014 12:29
designer
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<polymer-element name="my-element">
<template>