New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@advisoa/gateway-clients

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@advisoa/gateway-clients - npm Package Compare versions

Comparing version 1.0.21 to 1.0.22

2

dist/index.js

@@ -1,1 +0,1 @@

var P=Object.create;var h=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var g=(a,t)=>{for(var e in t)h(a,e,{get:t[e],enumerable:!0})},m=(a,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of I(t))!y.call(a,o)&&o!==e&&h(a,o,{get:()=>t[o],enumerable:!(n=E(t,o))||n.enumerable});return a};var S=(a,t,e)=>(e=a!=null?P(_(a)):{},m(t||!a||!a.__esModule?h(e,"default",{value:a,enumerable:!0}):e,a)),d=a=>m(h({},"__esModule",{value:!0}),a);var b={};g(b,{Reepay:()=>A});module.exports=d(b);var i=S(require("node-fetch"));var T={SUCCESS:200,SUCCESS_NEW_RESOURCE:201,SUCCESS_WITHOUT_RESPONSE:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,FORBIDDEN:403,INTERNAL_SERVER:500},R={DEVELOPMENT:"development",PRODUCTION:"production",STAGING:"staging"},N="Something went wrong. Please try again.",w=10,O=1,v=1,f=1,x=0,U=100,C=100,L={API_URL:"https://api.reepay.com/v1",LOGIN:"https://api.reepay.com/v1/authenticate/login",GET_PRIVATE_KEY:"https://api.reepay.com/v1/account/privkey"},M={SESSION_TIMEOUT:3e5},G=100,$={API_URL:"https://manage.quickpay.net/api",AGREEMENT:"https://manage.quickpay.net/api/agreements",ME:"https://manage.quickpay.net/api/me"},k=100,K={TRANSACTIONS:"https://api.onpay.io/v1/transaction",ACQUIRERS:"https://api.onpay.io/v1/acquirer"},D=100,Y={AUTH_TOKEN:"https://api.sumup.com/token",TRANSACTIONS:"https://api.sumup.com/v0.1/me/transactions/history",PAYOUTS:"https://api.sumup.com/v0.1/me/financials/payouts",CHECKOUTS:"https://api.sumup.com/v0.1/checkouts",PROFILE:"https://api.sumup.com/v0.1/me/"},j=100,p={RESPONSE_CODE:T,NODE_ENVIRONMENT:R,SOMETHING_WENT_WRONG:N,PER_PAGE:w,PAGE:O,DEFAULT_PAGE:v,SUCCESS:f,FAIL:x,BULK_CREATE_LIMIT:U,REEPAY_MAX_PAGE_LIMIT:C,REEPAY:L,CLEARHAUS:M,QUICK_PAY_PAGINATION_LIMIT:G,QUICK_PAY_API_URLS:$,ON_PAY_PAGINATION_LIMIT:k,ON_PAY_APIS_URLS:K,SUM_UP_PAGINATION_LIMIT:D,SUM_UP_APIS_URLS:Y,PENSOPAY_PER_PAGE_LIMIT:j};var u=class{static async getTokenAndMerchants(t,e){let o=await(await(0,i.default)("https://api.reepay.com/v1/authenticate/login",{headers:{accept:"application/json, text/plain, */*","accept-language":"da-DK,da;q=0.9","content-type":"application/x-www-form-urlencoded","sec-ch-ua":'"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","x-auth-token":"",Referer:"https://app.reepay.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:`email=${t}&password=${e}`,method:"POST"})).json();return{token:o.token,organisations:o.organisations}}static async generateMerchantAccessKey(t,e,n){let o=await(0,i.default)("https://api.reepay.com/v1/authenticate/login",{headers:{accept:"application/json, text/plain, */*","accept-language":"da-DK,da;q=0.9","content-type":"application/x-www-form-urlencoded","sec-ch-ua":'"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","x-auth-token":`${t}`,Referer:"https://app.reepay.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:`account=${e}&organisation=${n}`,method:"POST"}),{token:c}=await o.json(),s=await(await(0,i.default)("https://api.reepay.com/v1/account/privkey",{headers:{accept:"application/json, text/plain, */*","accept-language":"da-DK,da;q=0.9","sec-ch-ua":'"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","x-auth-token":`${c}`},referrer:"https://app.reepay.com/",referrerPolicy:"strict-origin-when-cross-origin",body:null,method:"POST",mode:"cors",credentials:"omit"})).json();process.exit(0)}constructor(t){this.base64PrivateKey=t}async callAPI(t,e,n="GET",o=null){let c=new URLSearchParams({size:p.REEPAY_MAX_PAGE_LIMIT,...e}).toString();try{let r=[],s=await(await(0,i.default)(`${p.REEPAY.API_URL}/${t}${c?`?${c}`:""}`,{method:n,headers:{Authorization:`Basic ${this.base64PrivateKey}`,"Content-Type":"application/json"},body:o?JSON.stringify(o):null})).json(),l=s.next_page_token;if(t.indexOf("list/")===-1)return s;for(s.content&&r.push(...s.content);l;)c=new URLSearchParams({size:p.REEPAY_MAX_PAGE_LIMIT,next_page_token:l,...e}).toString(),s=await(await(0,i.default)(`${p.REEPAY.API_URL}/${t}${c?`?${c}`:""}`,{method:n,headers:{Authorization:`Basic ${this.base64PrivateKey}`}})).json(),s.content&&r.push(...s.content),l=s.next_page_token;return r}catch(r){return console.log("error: ",r),null}}async getCustomers(t){return await this.callAPI("list/customer",t)}async getCharges(t){return await this.callAPI("list/charge",t)}async getTransactions(t){return await this.callAPI("list/transactions",t)}async getInvoices(t){return await this.callAPI("list/invoice",t)}async getInvoice(t,e){return await this.callAPI(`invoice/${t}`,e)}async getCharge(t,e){return await this.callAPI(`charge/${t}`,e)}async settleInvoice(t){return await this.callAPI(`charge/${t}/settle`,null,"POST")}async cancelInvoice(t){return await this.callAPI(`charge/${t}/cancel`,null,"POST")}async refundInvoice(t){return await this.callAPI("refund",null,"POST",{invoice:t})}async getPaymentMethods(t){return await this.callAPI("list/payment_method",t)}async getPayouts(t){return await this.callAPI("list/payout",t)}},A=u;0&&(module.exports={Reepay});
var E=Object.create;var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var I=(a,t)=>{for(var e in t)p(a,e,{get:t[e],enumerable:!0})},u=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of A(t))!l.call(a,o)&&o!==e&&p(a,o,{get:()=>t[o],enumerable:!(s=g(t,o))||s.enumerable});return a};var y=(a,t,e)=>(e=a!=null?E(_(a)):{},u(t||!a||!a.__esModule?p(e,"default",{value:a,enumerable:!0}):e,a)),P=a=>u(p({},"__esModule",{value:!0}),a);var K={};I(K,{Reepay:()=>m});module.exports=P(K);var r=y(require("axios"));var d={SUCCESS:200,SUCCESS_NEW_RESOURCE:201,SUCCESS_WITHOUT_RESPONSE:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,FORBIDDEN:403,INTERNAL_SERVER:500},R={DEVELOPMENT:"development",PRODUCTION:"production",STAGING:"staging"},S="Something went wrong. Please try again.",T=10,w=1,N=1,f=1,x=0,U=100,v=100,O={API_URL:"https://api.reepay.com/v1",LOGIN:"https://api.reepay.com/v1/authenticate/login",GET_PRIVATE_KEY:"https://api.reepay.com/v1/account/privkey"},C={SESSION_TIMEOUT:3e5},L=100,k={API_URL:"https://manage.quickpay.net/api",AGREEMENT:"https://manage.quickpay.net/api/agreements",ME:"https://manage.quickpay.net/api/me"},$=100,M={TRANSACTIONS:"https://api.onpay.io/v1/transaction",ACQUIRERS:"https://api.onpay.io/v1/acquirer"},G=100,Y={AUTH_TOKEN:"https://api.sumup.com/token",TRANSACTIONS:"https://api.sumup.com/v0.1/me/transactions/history",PAYOUTS:"https://api.sumup.com/v0.1/me/financials/payouts",CHECKOUTS:"https://api.sumup.com/v0.1/checkouts",PROFILE:"https://api.sumup.com/v0.1/me/"},D=100,c={RESPONSE_CODE:d,NODE_ENVIRONMENT:R,SOMETHING_WENT_WRONG:S,PER_PAGE:T,PAGE:w,DEFAULT_PAGE:N,SUCCESS:f,FAIL:x,BULK_CREATE_LIMIT:U,REEPAY_MAX_PAGE_LIMIT:v,REEPAY:O,CLEARHAUS:C,QUICK_PAY_PAGINATION_LIMIT:L,QUICK_PAY_API_URLS:k,ON_PAY_PAGINATION_LIMIT:$,ON_PAY_APIS_URLS:M,SUM_UP_PAGINATION_LIMIT:G,SUM_UP_APIS_URLS:Y,PENSOPAY_PER_PAGE_LIMIT:D};var h=class{static async getTokenAndMerchants(t,e){let s=await r.default.post("https://api.reepay.com/v1/authenticate/login",{email:t,password:e},{headers:{accept:"application/json, text/plain, */*","accept-language":"da-DK,da;q=0.9","content-type":"application/x-www-form-urlencoded","sec-ch-ua":'"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","x-auth-token":"",Referer:"https://app.reepay.com/","Referrer-Policy":"strict-origin-when-cross-origin"}});return{token:s.data.token,organisations:s.data.organisations}}static async generateMerchantAccessKey(t,e,s){let o=await r.default.post("https://api.reepay.com/v1/authenticate/login",{account:e,organisation:s},{headers:{accept:"application/json, text/plain, */*","accept-language":"da-DK,da;q=0.9","content-type":"application/x-www-form-urlencoded","sec-ch-ua":'"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","x-auth-token":`${t}`,Referer:"https://app.reepay.com/","Referrer-Policy":"strict-origin-when-cross-origin"}}),{token:n}=o.data,i=await r.default.post("https://api.reepay.com/v1/account/privkey",{},{headers:{accept:"application/json, text/plain, */*","accept-language":"da-DK,da;q=0.9","sec-ch-ua":'"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","x-auth-token":`${n}`},referrer:"https://app.reepay.com/",referrerPolicy:"strict-origin-when-cross-origin",mode:"cors",credentials:"omit"});process.exit(0)}constructor(t){this.token=Buffer.from(`${t}:`).toString("base64")}async get(t,e){let s=new URLSearchParams({size:c.REEPAY_MAX_PAGE_LIMIT,...e}).toString();try{let o=[],n=(await r.default.get(`${c.REEPAY.API_URL}/${t}${s?`?${s}`:""}`,{headers:{Authorization:`Basic ${this.token}`,"Content-Type":"application/json"}})).data,i=n.next_page_token;if(t.indexOf("list/")===-1)return n;for(n.content&&o.push(...n.content);i;)s=new URLSearchParams({size:c.REEPAY_MAX_PAGE_LIMIT,next_page_token:i,...filters}).toString(),n=(await r.default.get(`${c.REEPAY.API_URL}/${t}${s?`?${s}`:""}`,{headers:{Authorization:`Basic ${this.base64PrivateKey}`}})).data,n.content&&o.push(...n.content),i=n.next_page_token;return o}catch(o){return console.log("error: ",o),null}}async post(t,e){return(await r.default.post(`${c.REEPAY.API_URL}/${t}`,e,{headers:{Authorization:`Basic ${this.token}`}})).data}async put(t,e){return(await r.default.put(`${c.REEPAY.API_URL}/${t}`,e,{headers:{Authorization:`Basic ${this.token}`}})).data}async getCustomers(t){return await this.get("list/customer",t)}async getCharges(t){return await this.get("list/charge",t)}async getTransactions(t){return await this.get("list/transactions",t)}async getInvoices(t){return await this.get("list/invoice",t)}async getInvoice(t,e){return await this.get(`invoice/${t}`,e)}async getCharge(t,e){return await this.get(`charge/${t}`,e)}async settleInvoice(t){return await this.post(`charge/${t}/settle`)}async cancelInvoice(t){return await this.post(`charge/${t}/cancel`)}async refundInvoice(t){return await this.post("refund",{invoice:t})}async getPaymentMethods(t){return await this.get("list/payment_method",t)}async getPayouts(t){return await this.get("list/payout",t)}async getWebhookSettings(){return await this.get("account/webhook_settings")}async setWebhookSettings(t){return await this.put("account/webhook_settings",t)}},m=h;0&&(module.exports={Reepay});
{
"name": "@advisoa/gateway-clients",
"version": "1.0.21",
"version": "1.0.22",
"description": "",

@@ -12,2 +12,3 @@ "scripts": {

"dependencies": {
"axios": "^1.4.0",
"file-type": "^18.2.1",

@@ -14,0 +15,0 @@ "form-data": "^4.0.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc