UNPKG

mpesa-snap

Version:

Mpesa Add-on

2 lines 1.45 kB
/*MPESA SNAP*/ var v=p;function e(){var r=["18AONefT","123550WsLAPU","assign","80kwdsNW","1491726qgbRRb","257770dJLuEz","1484070eAVMJR","4716952AILFDQ","next","726230Ujxqjr","330147KPKElK","post","/mpesa/c2b/v2/registerurl","1ZNooIb","value","__awaiter","apply"];return(e=function(){return r})()}(()=>{for(var r=p,n=e();;)try{if(604594==-parseInt(r(341))*(-parseInt(r(349))/2)+-parseInt(r(338))/3+-parseInt(r(348))/4*(parseInt(r(350))/5)+parseInt(r(334))/6+parseInt(r(346))/7+parseInt(r(335))/8+parseInt(r(345))/9*(parseInt(r(337))/10))break;n.push(n.shift())}catch(r){n.push(n.shift())}})();var r=this&&this[v(343)]||function(n,i,c,u){return new(c=c||Promise)(function(e,t){var r=p;function o(r){var n=p;try{s(u[n(336)](r))}catch(r){t(r)}}function a(r){try{s(u.throw(r))}catch(r){t(r)}}function s(r){var n,t=p;r.done?e(r[t(342)]):((n=r[t(342)])instanceof c?n:new c(function(r){r(n)})).then(o,a)}s((u=u[r(344)](n,i||[]))[r(336)]())})};import{request as h}from"./request";function p(r,n){var t=e();return(p=function(r,n){return t[r-=334]})(r,n)}let n=f=>r(void 0,void 0,void 0,function*(){var r=v;try{var{consumer_key:n,consumer_secret:t,environment:e,response_type:o,confirmation_url:a,validation_url:s,short_code:i}=f,c=yield h({consumer_key:n,consumer_secret:t,environment:e}),u=r(340),p={ResponseType:o,ConfirmationURL:a,ValidationURL:s,ShortCode:i};return yield c[r(339)](u,Object[r(347)]({},p))}catch(r){throw r}});export{n as registerC2B};