robrighter / node-recurly Goto Github PK
View Code? Open in Web Editor NEWA node.js library for the Recurly.com api
License: MIT License
A node.js library for the Recurly.com api
License: MIT License
Hi,
My NodeJs application has a dependency on node-recurly. I can not build my app with "npm install" as js2xml seems to have disappeared from github.
9467 error Error: Command failed: Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-valorkin-js2xml-9c1b9dd3'...
9467 error warning: expected SRV RR, found RR type 1
9467 error fatal: remote error:
9467 error Repository not found.
9467 error
9467 error at ChildProcess.exithandler (child_process.js:647:15)
9467 error at ChildProcess.EventEmitter.emit (events.js:98:17)
9467 error at maybeClose (child_process.js:753:16)
9467 error at Socket.<anonymous> (child_process.js:966:11)
9467 error at Socket.EventEmitter.emit (events.js:95:17)
9467 error at Pipe.close (net.js:465:12)
9468 error If you need help, you may report this *entire* log,
9468 error including the npm and node versions, at:
9468 error <http://github.com/npm/npm/issues>
9469 error System Linux 3.13.0-24-generic
9470 error command "/usr/bin/node" "/usr/bin/npm" "install"
When I visit https://github.com/valorkin/js2xml
I receive a 404.
Recurly offers a beta feature for recording an offline payment through their api
this should trigger a successful_payment
webhook as opposed to the markSuccessful
function which simply results in an invoice_closed
webhook
api documentation here: https://dev.recurly.com/docs/enter-an-offline-payment-for-a-manual-invoice-beta
I can maybe do a PR if maintainer has interest
It's a node-ism that the first parameter in a callback is an error, but it's also a nodeism that the first parameter is an instanceof Error. This allows user callback code to assume a standard API -- things like error.stack
, error.message
-- for actions like logging, analytics, etc.
https://github.com/robrighter/node-recurly/blob/master/lib/client.js#L86 is one instance where node-recurly does not pass Errors to the user callback for the error parameter, breaking any user code that assumes a standard Error api.
_wrap_response()
can still set the .statusCode and .headers on the Error object, but it should return an instanceof Error if it's wrapping an error.
recurly.subscriptions.listByAccount(accountcode, callback) throw error when called with the signature (accountcode, callback) you indicated in the documentation. It accepts (accountcode, filter, callback) as per the source code.
For example,
I am trying to create a plan with multiple add-ons using node-recurly:
var subscriptionData = {
plan_code : planCode,
account : {
account_code : organizationId,
email : accountInfo.email,
first_name : accountInfo.first_name,
last_name : accountInfo.last_name,
},
currency : "USD",
subscription_add_ons : [
{
subscription_add_on : {
add_on_code : "sfd-pack0001"
}
},
{
subscription_add_on : {
add_on_code : "bmi-pack0001"
}
}
]
};
However it looks like js2xml treats the child nodes of subscription_add_ons as anonymous so the appear like so in the request:
<subscription_add_ons>
<item>
<subscription_add_on></subscription_add_on>
</item>
<item>
<subscription_add_on></subscription_add_on>
</item>
</subscription_add_ons>
I can make this work with one add-on only by doing a hash of hashes, but I'm not entirely sure what the correct way to do this is.
Any ideas? Are multiple add-ons not supported with this package?
I'm trying to install this node-module by running npm install node-recurly, but I keep getting this error saying:
//
Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
This has never happened to me before, and it doesn't make any sense, please help me.
I ran into a case where I created an Account on Recurly side, and when I get its details, I have the following as response (XML format):
<account>
...
<first_name></first_name>
<last_name nil="nil"></last_name>
...
</account>
which is then converted into (JSON format):
account: {
...
first_name: '',
last_name: {
$: {
nil: "nil"
}
},
...
}
whereas I would expect something like:
account: {
...
first_name: '',
last_name: null,
...
}
It seems that there is no standard convention to convert XML > JSON. BTW, I wonder whether the problem is linked to the library you are using to do the conversion (https://www.npmjs.org/package/xml2js) or whether it is an issue on Recurly side which should not return an XML element with a nil
attribute (but instead omitting the element itself could be better...)
So any idea on this problem would be highly appreciated.
Hi
I get this error on require ('node-recurly') with node v0.10.24.
Error: Cannot find module 'xml2js/lib'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at ...../node_modules/node-recurly/lib/recurly.js:3:16
at ...../node_modules/node-recurly/lib/recurly.js:151:3)
Please let me know how to fix this...
When trying to install v2.1.0 node-recurly via npm install it fails because js2xml is still referencing the valorkin github directory which has been moved. I believe if you version and push the new version to npm it will fix the issue since the github version is referencing another repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.