mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
const paypal = require('./paypal.provider');
|
||||
|
||||
const PROVIDERS = { paypal };
|
||||
|
||||
module.exports = {
|
||||
get(name) {
|
||||
const p = PROVIDERS[name];
|
||||
if (!p) throw new Error(`Unknown payment provider: "${name}". Available: ${Object.keys(PROVIDERS).join(', ')}`);
|
||||
return p;
|
||||
},
|
||||
list: () => Object.keys(PROVIDERS),
|
||||
};
|
||||
Reference in New Issue
Block a user