GithubHelp home page GithubHelp logo

orahkokos / coinpayments Goto Github PK

View Code? Open in Web Editor NEW
99.0 99.0 47.0 788 KB

CoinPayments is a cloud wallet solution that offers an easy way to integrate a checkout system for numerous cryptocurrencies.

License: MIT License

JavaScript 0.91% TypeScript 74.82% Dockerfile 1.76% Shell 22.51%

coinpayments's People

Contributors

azarus avatar ian-otto avatar lansana avatar namanyayg avatar orahkokos avatar uter1007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coinpayments's Issues

Help with IPn

Hello im using coinpayments system but getting error
"Error: HMAC signature does not match"
can anyone help me with this ?

Coinpayments IPN Errors on any POST with a "/" in the body

Title says it all. Looks like "/" characters are not encoded correctly by the library. A workaround could be to copy how PHP encodes these characters and manually reencode them to that character.

I was thinking of recoding the IPN function to take a "raw body" argument and to use that instead of trying to recover it the way it's done now.

Do Withdrawal IPNs work correctly?

According to the IPN documentation at https://www.coinpayments.net/merchant-tools-ipn, withdrawal IPN statuses are as follows:

0 = Waiting Email Confirmation
1 = Pending
2 = Sent/Completed

That conflicts with the general "Payment Statuses" section on the same page which clearly defines 2 as "Queued for nightly payout" and goes on to clarify, anything between 0 and 99 means "Payment is Pending in some way".

CreateWithdrawal options "add_tx_fee"

Is there an option in CreateWithdrawal command that has "add_tx_fee"? In CoinPayments API, there is an option but here, it does not. Can you clarify?

Withdrawal Tag

I need to add withdrawal tag for some withdrawals, like for ripple and bytecoin, but I cant find out how to and checking source, it seems that its not supported?

Is there a way I can add?

Example Code Broken For Certain Notifications?

Hello,

I'm not positive on this, but I think the example code may be broken for IPN Notifications when a user has paid, but there are no confirmations yet. The request will have a status of 0 and a status_text like 'Waiting for confirms... (0.00523/0.00523 received with 2 confirms)'.

I suspect the example would have an HMAC mismatch for that type of notification. I can't say for sure since I don't use this library, but I ran into a similar issue with my ipn listener. I found the issue ultimately came from the bodyParser middleware. I suspect the issue is related to the '/' in the status text.

To fix it in my project I implemented the following to keep a rawBody intact for HMAC requests:

app.use(
  bodyParser.urlencoded({
    extended: true,
    verify: (req, res, buf) => {
      if (req.header('Hmac')) {
        req.rawBody = buf;
      }
    }
  })
); // parse application/x-www-form-urlencoded and leave a rawBody for hmac requests

Cheers! Sorry I can't say for sure if this is an issue or not, but figured it'd be better to post and be wrong than to not say anything.

Site is down, Coinpayment doesn't work?

{ CoinpaymentsError: Invalid response
7|demo | at IncomingMessage.res.on (/root/coinpayments-service/node_modules/coinpayments/lib/index.js:92:27)
7|demo | at emitNone (events.js:111:20)
7|demo | at IncomingMessage.emit (events.js:208:7)
7|demo | at endReadableNT (_stream_readable.js:1064:12)
7|demo | at _combinedTickCallback (internal/process/next_tick.js:139:11)
7|demo | at process._tickDomainCallback (internal/process/next_tick.js:219:9)
7|demo | name: 'CoinpaymentsError',
7|demo | message: 'Invalid response',
7|demo | extra: 'We are sorry, the website is under maintenance. We should be back shortly.' }

We receive this message when use coinpayment on our project.
Please help! When does maintenance finish?

change Create Mass Withdrawal Response format

Plase make array object format to make easy to use for response result.

Example response from server now

{ 
  wd1: { 
    error: 'ok',
    id: 'CWBF3UECUQFCCNFIRUS73G5VON',
    status: 1,
    amount: '1.00000000' 
  },
  wd2: {
    error: 'That amount is larger than your balance!' 
  }
}

make it into

[
  {
    error: "ok",
    id: "CWBF3UECUQFCCNFIRUS73G5VON",
    status: 1,
    amount: 1.00000000
  },
  {
    error: "That amount is larger than your balance!"
  }
]

Thanks

Can't resolve 'crypto'

./node_modules/coinpayments/dist/internal.js
Module not found: Error: Can't resolve 'crypto' in 'D:\Raven\RavenFrontend\node_modules\coinpayments\dist'

I am getting this error once i call create transaction api.

IPN HTTP(S) POST not working.

So basically I just followed the example file under the example folder.
But everytime I test creating a cointransaction when I check my server it alwasy returns "COINPAYMENTS_INVALID_REQUEST" so when I checked my node_modules files turns out req.body is always empty.

Any ideas??


`"use strict";

var qs = require("querystring"),
crypto = require("crypto");

module.exports = function () {

function IPN(_ref) {
var _this = this;

var merchantId = _ref.merchantId,
    merchantSecret = _ref.merchantSecret,
    _ref$rawBodyIndex = _ref.rawBodyIndex,
    rawBodyIndex = _ref$rawBodyIndex === undefined ? "body" : _ref$rawBodyIndex;

if (!merchantId || !merchantSecret) {
  throw "Merchant ID and Merchant Secret are needed";
}

var getPrivateHeadersIPN = function getPrivateHeadersIPN(parameters) {
  if (typeof parameters === "object") //if no rawBody provided, fallback to original usage.
    parameters = qs.stringify(parameters).replace(/%20/g, "+");

  return crypto.createHmac("sha512", merchantSecret).update(parameters).digest("hex");
};

return function (req, res, next) {

  console.log('req.body', req.body) // ==> returns an empty object
  console.log('req.get("HMAC)', req.get("HMAC")) // ==> returns HMAC signature

  if (!req.get("HMAC") || !req.body || !req.body.ipn_mode || req.body.ipn_mode !== "hmac" || merchantId !== req.body.merchant) {
    return next("COINPAYMENTS_INVALID_REQUEST");
  }

  var hmac = getPrivateHeadersIPN(req[rawBodyIndex]);

  if (hmac !== req.get("HMAC")) {
    return next("COINPAYMENTS_INVALID_REQUEST");
  }
  res.end();
  if (req.body.status < 0) {
    _this.emit("ipn_fail", req.body);
    return next();
  }
  if (req.body.status < 100) {
    _this.emit("ipn_pending", req.body);
    return next();
  }
  if (req.body.status == 100) {
    _this.emit("ipn_complete", req.body);
    return next();
  }
};

}

return IPN;
}();`

Instance of CoinpaymentsError is not CoinpaymentsError

A variable that is instantiated with CoinpaymentsError is not an instance of CoinpaymentsError.

Here's a basic example:

import CoinpaymentsError from "coinpayments/dist/error";

const error = new CoinpaymentsError();

assert(error instanceof CoinpaymentsError);

I'm guessing it's because tsconfig target is ES5.
Would it be possible to change this to ES6 ?

Integration Fix

I tried to connect this api to my meanstack app.
But I got a error.
Can I integrate this node module to my app successfully?


Unhandled rejection Error: TypeError: CoinPayments.on is not a function
at /Users/dragon/Desktop/bitter_handlebar/node_modules/meanstack/lib/foundation/Application.js:80:19
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
at App.resolveProvider (/Users/dragon/Desktop/bitter_handlebar/node_modules/meanstack/lib/foundation/Application.js:79:15)
at App.bootstrap (/Users/dragon/Desktop/bitter_handlebar/node_modules/meanstack/lib/foundation/Application.js:60:10)
at bootstrap (/Users/dragon/Desktop/bitter_handlebar/bootstrap/index.js:26:15)
at Object. (/Users/dragon/Desktop/bitter_handlebar/index.js:8:23)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3

My code is


let
CoinPayments = require('coinpayments'),
express = require('express'),
bodyParser = require('body-parser');

let app = express();

app.use(bodyParser.urlencoded({ extended: true }));

let events = CoinPayments.events;

let middleware = [
CoinPayments.ipn({
'merchantId': 'My merchantid',
'merchantSecret': 'My IPN Secret'
}),
function (req, res, next) {
// Handle via middleware
console.log(req.body);
}]

app.use('/', middleware);

// Handle via instance
CoinPayments.on('ipn_fail', function(data){
// Handle failed transaction
console.log("IPN FAIL");
console.log("coin: " + data);
});
CoinPayments.on('ipn_pending', function(data){
// Handle pending payment
console.log("IPN PENDING");
console.log("coin: " + data);
});
CoinPayments.on('ipn_complete', function(data){
// Handle completed payment
console.log("IPN COMPLETE");
console.log("coin: " + data);
});

// Handle via static field ( can be used in other files, aka no need to init )
events.on('ipn_fail', function(data){
// Handle failed transaction
console.log("IPN FAIL");
console.log("event: " + data);
});
events.on('ipn_pending', function(data){
// Handle pending payment
console.log("IPN PENDING");
console.log("event: " + data);
});
events.on('ipn_complete', function(data){
// Handle completed payment
console.log("IPN COMPLETE");
console.log("event: " + data);
});

IPN_FAIL event do not send ipn on cancelled/timed out transactions

First i wish to thank the person that developed this npm package, but there is one thing i have noticed about the ipn, i have noticed that it only sends the ipn on pending and completed transcations, but not on a cancelled/timed out trans.. same thing happens in coinpayments dashboard under ipn_history the Status remain 0 even after a transaction is cancelled. Am requesting and making a wish that this can be implemented in later version, as this is a work for us on our own side to let our clients know cancelled or timed out transactions in their dashboard.

let events = CoinPayments.events;

var middleware = [
  coinPayment.ipn({
    'merchantId': process.env.MERCHANT_ID,
    'merchantSecret': process.env.MERCHANT_SECRET
  }), 
  function (req, res, next) {
    console.log('handling working');
}]

events.on('ipn_fail', function(data){
    // Handle failed transaction
    console.log("IPN FAIL");
    console.log(data);
});

auto_confirm must be optional

on README, function createWithdrawal have options auto_confirm that have value 0 or 1 and default value is 1.
But they always set to 1. i can't set auto_confirm to 0 becouse when function called they always set to 1.

CoinPayments.prototype.createWithdrawal = function (options, callback) {
    options.cmd = 'create_withdrawal';
    options.auto_confirm = 1;
    return this.request(options, callback);
  };

Please fix this you can use Object.assign
https://developer.mozilla.org/id/docs/Web/JavaScript/Reference/Global_Objects/Object/assign

transaction status

hello

when the "Get transaction information" method is called, the transaction status does not change from 0 to 1 when the sender sent funds.

{
time_created: 1617892169,
time_expires: 1617946169,
status: 0,
status_text: 'Waiting for buyer funds...',
type: 'coins',
coin: 'BTC',
amount: 19000,
amountf: '0.00019000',
received: 0,
receivedf: '0.00000000',
recv_confirms: 0,
payment_address: '3QUwN7io7VponpS7ZtYAdYpkH2MkgijvA6'
}

{
time_created: 1617892169,
time_expires: 1617946169,
status: 0,
status_text: 'Waiting for confirms...',
type: 'coins',
coin: 'BTC',
amount: 19000,
amountf: '0.00019000',
received: 19000,
receivedf: '0.00019000',
recv_confirms: 0,
payment_address: '3QUwN7io7VponpS7ZtYAdYpkH2MkgijvA6'
}

as you can see from the api answers both in case 'Waiting for buyer funds...' and in case 'Waiting for confirms...' the status is the same = 0

on the coinpayments page (https://www.coinpayments.net/merchant-tools-ipn) in the "Payment statuses" section it is indicated:
0 = Waiting for buyer funds
1 = We have confirmed coin reception from the buyer

or am I misunderstanding something?

CORS problem

I've a CORS problem with your endPoint api.php

Any solution ?

checkout_url not present

checkout_url not present CoinpaymentsCreateTransactionResponse

on version 2.1.1


export interface CoinpaymentsCreateTransactionResponse {
  amount: string
  txn_id: string
  address: string
  confirms_needed: string
  timeout: number
  status_url: string
  qrcode_url: string
}

expected
checkout_url: string;

IPN Sent Successfully not working

after upgrading to the new version , and following the steps , i get ipn , with no problems , but in my coin-payment account , sent successfully appears as no (num tries left) , even when i get ipn calls to the back-end receiving it successfully with no errors or no problems , but this didn't happen in older version , so can some one help in this matter
here is the code that i'm trying after update to version 2.x.x

const { verify } = require(`coinpayments-ipn`);
const CoinpaymentsIPNError = require(`coinpayments-ipn/lib/error`);

const {
  MERCHANT_ID,
  IPN_SECRET
} = process.env;

app.post('/notify', function (req, res, next) {
  if(!req.get(`HMAC`) || !req.body || !req.body.ipn_mode || req.body.ipn_mode !== `hmac` || MERCHANT_ID !== req.body.merchant) {
    return next(new Error(`Invalid request`));
  }

  let isValid, error;

  try {
    isValid = verify(req.get(`HMAC`), IPN_SECRET, req.body);
  } catch (e) {
    error = e;
  }
  
  if (error && error instanceof CoinpaymentsIPNError) {
    return next(error);
  }
  
  if (!isValid) {
    return next(new Error(`Hmac calculation does not match`));
  }

  return next();
}, function (req, res, next) {
  console.log(`Process payment notification`);
  console.log(req.body);
  // then some operations in db
  return next();
});

client.rates options.accepted doesn't work

client.rates method
if options.accepted set to 1, still list all the currencies.
(but options.short works)

client.rates({ accepted: 1 }, (err, result) => { if(err) { console.log('-ERR!\n%s', err); } else { console.log('resault:'); console.log(result); } });

version 1.1.2

CoinPayment option "ipn_url"

In Coinpayments API call for createWithdrawal there is an option for ipn_url(Instant-Payment-Notification), but I don't think it is included here.

Get Exchange Rates / Supported Coins API doesn't return accepted coins only

Hi all,
I am trying to get the whole list of accepted currencies on the settings page and I thought client.rates was the right API.
According to the documentation, the accepted parameter set to 1 should limit the result set to the enabled coins only, but it is not true: all of the currencies are returned in the JSON data no matter if they are enabled or not. A further filter must be applied to the result set to get enabled currencies only.
It seems the "accepted" parameter is not honored.
Thank you

Regular Expression Fix for MassWithdrawal

Hi,
there is currently a bug in the Masswithdrawal validate function. The given regex only works for wd0-wd9. Please add * to your expression.

/wd[wd[0-9]][(amount|address|currency|dest_tag)]/;
to
/wd[wd[0-9]*][(amount|address|currency|dest_tag)]/;

I've wanted to create a pull request but I dont have the permissions to do that.

IPN isn't working

I've been trying to set the IPN address to get the HTTP callback on my server. But IPN doesn't seems working.

client.getCallbackAddress(
    {
        currency: 'btc',
        ipn_url: 'https://webhook.site/16732ba6-6427-4eff-8195-ec8604cb8857'
    },
    console.log
);

Here, I used http://webhook.site website just for testing callbacks.

Fiat

Does it accept fiat?

client.rates options.accepted doesn't work

Noticed this issue previously as well.

client.rates({short: 1, accepted: 1})
    .then((result) =>{res.json(result)})
    .catch((err) => {res.json(err)});

short is working but accepted isn't. Returning full list of all coins.

Below code also returning all coins.
client.rates({accepted: 1})
.then((result) =>{res.json(result)})
.catch((err) => {res.json(err)});

I'm using version 2.0.3

API key includes rates permission.

Remove warnings about migrating to the new version

Please, remove annoying messages about new version of your software. API V2 looks extremely weird and is not backwards compatible.

You've changed too much to force this message. And migration to the new version is complicated enough for projects already using 1 version of your lib.

CORS error when using CoinPayments API from Next.js application

I'm attempting to integrate the CoinPayments API into my Next.js application using the coinpayments npm package. However, when I try to create a new transaction using the createTransaction method, I receive the following error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.coinpayments.net/api.php. (Reason: CORS header 'Access-Control-Allow-Origin' missing). Status code: 403

I believe this error is related to Cross-Origin Resource Sharing (CORS) restrictions that prevent my Next.js application from making requests to the CoinPayments API. I've tried setting the mode option to no-cors when making the request, but this doesn't seem to resolve the issue.

Can you provide guidance on how to resolve this issue? Do I need to configure my server to allow cross-origin requests, or is there a way to configure the coinpayments package to handle CORS headers correctly?

Thanks for your help!

error in cb is always empty.

Errors are always empty in the callback error parameter.
So we can only guess if there was the issue with the request. Please make it proper thank you.

COINPAYMENTS_INVALID_REQUEST

COINPAYMENTS_INVALID_REQUEST this message keeps appearing in my console , even that the api is working fine , so i wanna know what may cause such a thing , and how the api payment system is working fine , and in the same time from time to time i get this error message COINPAYMENTS_INVALID_REQUEST , so does some one have idea of what may cause such a problem

Reducer Error in MassWithdrawal

withdrawalArray.reduce produces an Error:

","message":"Cannot set property 'wd[wd2][amount]' of undefined"} when I am debugging the options object got undefined after the first loop run

Better IPN support

Hi there!
First thanks for your great work! I am using your library to handle coinpayments payments however your current IPN integration is quite messy and hard to read actual states since it only works with express. Using this with sails.js or a custom framework that does not use any low level api of express is not straight forward.

I'd like to propse to have an option to parse custom input for the IPN verification and return a promise instead of executing the next function. This way we are able to reuse the IPN code easily, while this approach still allows to keep the current express middleware solution in place.

I can prepare a PR for this in to time if you're willing to accept an integraton with a promise version of the IPN handling.

Thanks!
Azarus

querystring deprecation with latest webpack

updating new version of angular, i got this error

`./node_modules/coinpayments/dist/internal.js:56:20-42 - Error: Module not found: Error: Can't resolve 'querystring' in 'D:\Code\frontend-monorepo\node_modules\coinpayments\dist'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "querystring": require.resolve("querystring-es3") }'
- install 'querystring-es3'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "querystring": false }
`

I can not set ipn_url when I use 'client.createMassWithdrawal'.

Hello,
I want to set ipn_url when I use 'client.createMassWithdrawal' but the api does not recognize the ipn_url.

My code is like below.
Please teach me how to use.

async function () {
let result = null

const withdrawArray = {
amount: '0.02937',
currency: 'LTCT',
address: 'MY ADDRESS',
add_tx_fee: 1,
ipn_url: ' MY IPN_URL'
}

await client.createMassWithdrawal(withdrawalArray)
.then(function (res) {
result = res
})
.catch((e) => {
console.log(e)
})

return result
}

Provide additional error information for debugging

if (err) return console.warn(`Polling Error...`);

Regardless of the error occurring during IPN poll, this line will always say "Polling Error..." which is quite ambiguous. I personally have modified it to:

if (err) {
  console.log(err);
  return console.warn('Polling Error...');
}

This gave me the error This API Key does not have permission to use that command!, not sure if I would be able to debug without this piece of information :)

I'd be happy to submit a pull request to fix this, but not sure what the cleanest approach might be.

Automated IPN crash

The automated IPN crash if it receives something it cannot parse. While testing it received html instead of JSON.

Seems to be a reply from proxy or bot checker called Incapsula. Might have to wrap JSON.parse(data) in a try/catch.

2.0.0 could not find entry

failed at:
coinpayments = require('coinpayments')
node could not find the entry point for the coinpayments object in the 2.0.0 version
I like the new API calls, but is there a version requirement for node?
running v6.11.3

How to use coinpayments.getTx?

Hey thanks for the library, it works great for mwe when I create a transaction but when I go to view it I get problems...

I have an api router in nextjs. pages/api/checkout

import { coinpayments } from "../../../initCoinpayments";

export default async function handler(req, res) {
  const { id } = req.query;

  try {
    const transactionInfo = await coinpayments.getTx({ txid: id });
    res.status(200).json(transactionInfo);
  } catch (error) {
    console.error("Error fetching transaction info:", error);
    res.status(500).json({ error: "An error occurred while fetching transaction info." });
  }
}

and then inside pages/checkout I have:

import Container from "@/components/Container";
import { supabase } from "../../../initSupabase";
import { useUser } from "@supabase/auth-helpers-react";
import { useEffect, useState } from "react";
import PageTitle from "@/components/PageTitle";
import { coinpayments } from "../../../initCoinpayments";

export default function Document() {
  const user = useUser(); // Get the authenticated user
  const [checkoutData, setCheckoutData] = useState(null);
  const [loading, setLoading] = useState(false);

  useEffect(() => {
    setLoading(true);
  
    async function fetchCheckout() {
      if (user) {
        let { data: checkoutData, error: checkoutError } = await supabase
          .from('checkout')
          .select('*')
          .eq('user', user.id)
          .order('created_at', { ascending: false })
          .limit(1);
  
        if (checkoutError) {
          console.error("Error fetching checkout data:", checkoutError);
        }
  
        if (checkoutData && checkoutData.length > 0) {
          const latestCheckout = checkoutData[0];
          setCheckoutData(latestCheckout);
  
          if (latestCheckout.txn_id) {
            try {
              const response = await fetch(`/api/checkout?id=${latestCheckout.txn_id}`);
              const transactionInfo = await response.json();
              console.log("Transaction Info:", transactionInfo);
              // Do something with the transactionInfo, like updating state
            } catch (error) {
              console.error("Error fetching transaction info:", error);
            }
          }
        }
      }
  
      setLoading(false);
    }
  
    fetchCheckout();
  }, [user, setCheckoutData]);
  

  return (
    <>
      <Container>
        <PageTitle>Checkout</PageTitle>
        {checkoutData && <CheckoutInfo data={checkoutData} />}
      </Container>
    </>
  )
}

const CheckoutInfo = ({ data }) => {
  return (
    <div className='mw-96'>
      <div className="text-lg font-bold text-center">
        {data.amount} {data.currency2}
      </div>
      <img src={data.qrcode_url} alt="QR Code" className="block mx-auto my-4" />

      <p className="mb-2">
        <strong>Created At:</strong> {new Date(data.created_at).toLocaleString()}
      </p>
      <p className="mb-2">
        <strong>Transaction ID:</strong> {data.txn_id}
      </p>
      {/* <p className="mb-2">
        <strong>Not working? Complete on coinpayment.net</strong> <a href={data.checkout_url}>{data.checkout_url}</a>
      </p> */}
      <p className='w-100 block text-wrap'>{data.address}</p>
    </div>
  );
};

Which returns a 500 error to the console:

Transaction Info: {error: 'An error occurred while fetching transaction info.'}

What am I doing wrong here? The api key works for creating the transaction but not for this particular function?

Here's the full error from the terminal where I'm running npm run dev

Error fetching transaction info: CoinpaymentsError: This API Key does not have permission to use that command!
    at IncomingMessage.<anonymous> (/home/dan/Documents/code/banana/node_modules/coinpayments/dist/internal.js:91:35)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  extra: {
    data: {
      error: 'This API Key does not have permission to use that command!',
      result: []
    }
  }
}

IPN HTTP(S) in a servless enviroment

Hello, i'm trying to use the API with cloud functions with firebase. In yours exemple of IPN using express, you expect to be running in a nodejs server continuosly? Or you make post requests every time a transaction status change? So i'm asking if the API works in a servless ambient or i must have a running server. Thanks for your time!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.