mpesa-snap
Version:
Mpesa Add-on
2 lines • 1.69 kB
JavaScript
/*MPESA SNAP*/
function e(){var t=["CustomerPayBillOnline","328rNJNfe","value","key","then","709484pxhISk","14mqOlUN","3282624UcdsMc","889wAgUCu","4631440YVaUtI","12lxvtQu","environment","stkPush","secret","16893UxGNUY","174MZlkKb","553746XpSHFK","__awaiter","next","password","shortCode","4324915AYxYLQ","11hIPBZg"];return(e=function(){return t})()}var o=h,t=((()=>{for(var t=h,r=e();;)try{if(683973==+parseInt(t(195))*(parseInt(t(202))/2)+parseInt(t(197))/3*(-parseInt(t(192))/4)+parseInt(t(185))/5+-parseInt(t(203))/6*(-parseInt(t(193))/7)+parseInt(t(188))/8*(parseInt(t(201))/9)+parseInt(t(196))/10+parseInt(t(186))/11*(-parseInt(t(194))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}})(),this&&this[o(204)]||function(o,c,i,u){return new(i=i||Promise)(function(e,r){var t=h;function s(t){try{n(u.next(t))}catch(t){r(t)}}function a(t){try{n(u.throw(t))}catch(t){r(t)}}function n(t){var r,n=h;t.done?e(t.value):((r=t[n(189)])instanceof i?r:new i(function(t){t(r)}))[n(191)](s,a)}n((u=u.apply(o,c||[]))[t(205)]())})});import{stkPush as c}from"./stkpush";function h(t,r){var n=e();return(h=function(t,r){return n[t-=185]})(t,r)}class r{constructor(t,r){var n=o,{consumer_key:t,consumer_secret:e,shortCode:s,password:a}=t;this[n(190)]=t,this.secret=e,this[n(207)]=s,this.password=a,this.environment=r}[o(199)](a){return t(this,void 0,void 0,function*(){var t=h;try{var{accountRef:r,amount:n,phoneNumber:e,callBackUrl:s}=a;return yield c({accountReference:r,amount:n,phoneNumber:e,shortCode:this[t(207)],consumer_key:this[t(190)],consumer_secret:this[t(200)],transactionType:t(187),environment:this[t(198)],password:this[t(206)],callBackUrl:s})}catch(t){}})}}export{r as Mpesa};