Skip to content

Instantly share code, notes, and snippets.

@diegovdev
Forked from owenkellogg/outbound.md
Last active August 29, 2015 14:26

Revisions

  1. Steven Zeiler revised this gist Dec 25, 2014. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions outbound.md
    Original file line number Diff line number Diff line change
    @@ -8,24 +8,24 @@ In `gatewaydfile.js`:

    gatewayd.protocol.external.outbound.extend({
    quote: function(address, amount, currency) {
    quote: function(options, resolve, reject) {
    if (gatewayd.validator.isEmail(address)) {
    if (currency === 'BTC') {
    if (amount <= 0.1) {
    this.resolve({
    destination: destination,
    amount: amount,
    currency: currency
    if (options.currency === 'BTC') {
    if (options.amount <= 0.1) {
    resolve({
    destination: options.destination,
    amount: options.amount * 1.01,
    currency: options.currency
    });
    } else {
    this.reject(new Error('amount must be less than 0.1'));
    reject(new Error('amount must be less than 0.1'));
    }
    } else {
    this.reject(new Error('currency must be BTC'));
    reject(new Error('currency must be BTC'));
    }
    } else {
    this.reject(new Error('address must be email'));
    reject(new Error('address must be email'));
    }
    }
    });
  2. Steven Zeiler revised this gist Dec 25, 2014. 1 changed file with 22 additions and 17 deletions.
    39 changes: 22 additions & 17 deletions outbound.md
    Original file line number Diff line number Diff line change
    @@ -2,27 +2,32 @@

    Purpose: To discover the interface for Gateway Services Protocol to be extended per a given use case

    gatewayd.protocol.external.outbound.extend({

    quote: function(address, amount, currency) {
    In `gatewaydfile.js`:

    module.exports = function(gatewayd) {

    gatewayd.protocol.external.outbound.extend({
    if (gatewayd.validator.isEmail(address)) {
    if (currency === 'BTC') {
    if (amount <= 0.1) {
    this.resolve({
    destination: destination,
    amount: amount,
    currency: currency
    });
    quote: function(address, amount, currency) {
    if (gatewayd.validator.isEmail(address)) {
    if (currency === 'BTC') {
    if (amount <= 0.1) {
    this.resolve({
    destination: destination,
    amount: amount,
    currency: currency
    });
    } else {
    this.reject(new Error('amount must be less than 0.1'));
    }
    } else {
    this.reject(new Error('amount must be less than 0.1'));
    this.reject(new Error('currency must be BTC'));
    }
    } else {
    this.reject(new Error('currency must be BTC'));
    this.reject(new Error('address must be email'));
    }
    } else {
    this.reject(new Error('address must be email'));
    }
    }
    });
    });
    };

  3. Steven Zeiler revised this gist Dec 25, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions outbound.md
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@ Purpose: To discover the interface for Gateway Services Protocol to be extended
    gatewayd.protocol.external.outbound.extend({

    quote: function(address, amount, currency) {
    if (gatewayd.validator.isEmail(address)) {
    if (currency === 'BTC') {
    if (amount <= 0.1) {
  4. Steven Zeiler revised this gist Dec 25, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion outbound.md
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,8 @@
    Purpose: To discover the interface for Gateway Services Protocol to be extended per a given use case

    gatewayd.protocol.external.outbound.extend({

    quote: function(address, amount, currency) {
    if (gatewayd.validator.isEmail(address)) {
    if (currency === 'BTC') {
    if (amount <= 0.1) {
  5. Steven Zeiler revised this gist Dec 25, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion outbound.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Outbound Coingate
    # Gatewayd Protocol Outbound External

    Purpose: To discover the interface for Gateway Services Protocol to be extended per a given use case

  6. Steven Zeiler revised this gist Dec 25, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion outbound.md
    Original file line number Diff line number Diff line change
    @@ -23,5 +23,5 @@ Purpose: To discover the interface for Gateway Services Protocol to be extended
    this.reject(new Error('address must be email'));
    }
    }
    })
    });

  7. Steven Zeiler created this gist Dec 25, 2014.
    27 changes: 27 additions & 0 deletions outbound.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # Outbound Coingate

    Purpose: To discover the interface for Gateway Services Protocol to be extended per a given use case

    gatewayd.protocol.external.outbound.extend({
    quote: function(address, amount, currency) {
    if (gatewayd.validator.isEmail(address)) {
    if (currency === 'BTC') {
    if (amount <= 0.1) {
    this.resolve({
    destination: destination,
    amount: amount,
    currency: currency
    });
    } else {
    this.reject(new Error('amount must be less than 0.1'));
    }
    } else {
    this.reject(new Error('currency must be BTC'));
    }
    } else {
    this.reject(new Error('address must be email'));
    }
    }
    })