vanillapay

For using vanilla pay NodeJs Module

Usage no npm install needed!

<script type="module">
  import vanillapay from 'https://cdn.skypack.dev/vanillapay';
</script>

README

VanillaPay

For using vanilla pay NodeJs Module

Inside your project folder run

$ npm install --save vanillapay

var VanillaPay = require('vanillapay');
// get Paiment instance.
var vanillapay = new VanillaPay(your_site_url,client_id,client_secret,public_key,private_key);

To unit payment processing


vanillapay.initPaie(idpanier,montant,nom,reference,adresseip,function(idpayment){
    //idpaiement is your payment id (crypted) that you need if you want to get payment result
    console.log(idpayment);
},function(error){
    console.log(error);
});
//You will be redirect to VanillaPay payment and  follow it ;

To get payment result ;


//Getting payment result
vanillapay.resultPaie(idpayment,(result){
    console.log(result);
},function(error){
    console.log(error);
});

Digi-Talent