Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickP committed Jun 3, 2016
2 parents 5c6e78c + 7c0de6b commit 123f59d
Show file tree
Hide file tree
Showing 8 changed files with 628 additions and 621 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
21 changes: 10 additions & 11 deletions .travis.yml
Expand Up @@ -3,18 +3,17 @@ language: node_js
script: "npm test"

node_js:
- "4"
- "6"
- "4"

notifications:
email: false
email: false

deploy:
- provider: npm
email: "mulotmail@gmail.com"
api_key:
secure: FPj38o+Rvpk/f/0MUNLSYztg4rfOAWJqtpFeAL5Ebp7DZqFGRRzK+EzEq3knecoRyV9zqMw52LY1bZgvXv8zLN8Htfq5836sftltUWTYdDgeMkUq5yDz4XO1gCeNdb+n0byf2CE7dk1KKYzUIOmd+ZGqM3dCcrgooh3hj+1SoCpXReXVa4iVPUNBra0dGBfQH5esB8OlUe6NhOJ9b7fDS3nfTEvT2tiNR8iLM6qvKhwWIv2udXh5W8JMVJx4BJm5Wp0rr+wjSSeutPSGITF4pfz6b0/YlE5DvfOJU7oGxKB58yXLfNb1XDW9zy5/0nr9aH/OYxVn3lKKmkZ+7KQxIaZamJVfn1mTDM4XBjhnzMWcrmcIoogtK9GMjQjmdHqAo+/tNHfEvdtfCAEvM+r6unauEsRtvIYLXg3cqv1oDY0W2rcyWu9cNW+caUbcJqlY5xJF21saEj7kS25T77yUcvvQ6QCW7xmyFd5cy7BYPl5F3os+yj+yrPslt+90cr2RaeX0GG7mi1OroyWa2xHfbRcADYTslHuYqdOt8V70o9D2M1Q9gvM8szRcfds0Rrw4rG05I3/AnjZIS49jYYhDyoBN5RGO9NBc4jV5t/+VvY0koClFcX/7evUVvhkrddFero3V38i55RIk8TgPzpddoxXKc7wLMb/t6g3rqJ/j/J4=
skip_cleanup: true
on:
branch: master
node: "4"
- provider: npm
email: "mulotmail@gmail.com"
api_key:
secure: FPj38o+Rvpk/f/0MUNLSYztg4rfOAWJqtpFeAL5Ebp7DZqFGRRzK+EzEq3knecoRyV9zqMw52LY1bZgvXv8zLN8Htfq5836sftltUWTYdDgeMkUq5yDz4XO1gCeNdb+n0byf2CE7dk1KKYzUIOmd+ZGqM3dCcrgooh3hj+1SoCpXReXVa4iVPUNBra0dGBfQH5esB8OlUe6NhOJ9b7fDS3nfTEvT2tiNR8iLM6qvKhwWIv2udXh5W8JMVJx4BJm5Wp0rr+wjSSeutPSGITF4pfz6b0/YlE5DvfOJU7oGxKB58yXLfNb1XDW9zy5/0nr9aH/OYxVn3lKKmkZ+7KQxIaZamJVfn1mTDM4XBjhnzMWcrmcIoogtK9GMjQjmdHqAo+/tNHfEvdtfCAEvM+r6unauEsRtvIYLXg3cqv1oDY0W2rcyWu9cNW+caUbcJqlY5xJF21saEj7kS25T77yUcvvQ6QCW7xmyFd5cy7BYPl5F3os+yj+yrPslt+90cr2RaeX0GG7mi1OroyWa2xHfbRcADYTslHuYqdOt8V70o9D2M1Q9gvM8szRcfds0Rrw4rG05I3/AnjZIS49jYYhDyoBN5RGO9NBc4jV5t/+VvY0koClFcX/7evUVvhkrddFero3V38i55RIk8TgPzpddoxXKc7wLMb/t6g3rqJ/j/J4=
skip_cleanup: true
on:
branch: master
node: "4"
36 changes: 18 additions & 18 deletions README.md
Expand Up @@ -13,21 +13,21 @@
var cmcic = require('cmcic');

var tpe = new cmcic.tpe({
CMCIC_TPE: 'tpeid',
CMCIC_CODESOCIETE: 'societykey',
CMCIC_CLE: '1234567890abcdef',
CMCIC_BANK: 'CIC',
CMCIC_LNG: 'FR',
CMCIC_CURRENCY: 'EUR',
CMCIC_URL_RETOUR: '/url/return',
CMCIC_URLOK: '/url/ok',
CMCIC_URLKO: '/url/ko'
CMCIC_TPE: 'tpeid',
CMCIC_CODESOCIETE: 'societykey',
CMCIC_CLE: '1234567890abcdef',
CMCIC_BANK: 'CIC',
CMCIC_LNG: 'FR',
CMCIC_CURRENCY: 'EUR',
CMCIC_URL_RETOUR: '/url/return',
CMCIC_URLOK: '/url/ok',
CMCIC_URLKO: '/url/ko'
});

var t = {
email: 'exemple@exemple.fr',
amount: 300,
reference: 'qwerty'
email: 'exemple@exemple.fr',
amount: 300,
reference: 'qwerty'
};

var trans = new cmcic.transaction(tpe, t);
Expand All @@ -44,16 +44,16 @@ On your return url (still with expressjs)
var ret = tpe.checkTransactionReturn((req.method == 'POST')? req.body : req.query);

if (!ret.isSealValidated) {
console.log('MAC seal is invalid')
return res.send(tpe.RETURN_NOTOK);
console.log('MAC seal is invalid')
return res.send(tpe.RETURN_NOTOK);
}

if (ret.status) {
console.error('Payment is ok');
res.send(tpe.RETURN_OK);
console.error('Payment is ok');
res.send(tpe.RETURN_OK);
} else {
console.error('Payment is fail : ', ret.motifrefus );
res.send(tpe.RETURN_OK);
console.error('Payment is fail : ', ret.motifrefus );
res.send(tpe.RETURN_OK);
}
```

Expand Down

0 comments on commit 123f59d

Please sign in to comment.