10 Commits

Author SHA1 Message Date
12b6a771a2 1.0.9 2020-08-23 15:36:08 +00:00
ebf2796e0e fix(core): update 2020-08-23 15:36:07 +00:00
fe62ecd0e1 1.0.8 2020-08-23 15:35:28 +00:00
4972b135d5 fix(core): update 2020-08-23 15:35:28 +00:00
e15f0ff2b2 1.0.7 2020-08-23 13:49:33 +00:00
4bbcb9639c 1.0.6 2020-08-23 13:48:47 +00:00
306453cde4 fix(core): update 2020-08-23 13:48:46 +00:00
2e8b364add 1.0.5 2020-08-23 13:48:08 +00:00
50f53f6596 1.0.4 2020-08-23 13:34:41 +00:00
8e74c00480 fix(core): update 2020-08-23 13:34:40 +00:00
6 changed files with 11 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
{
"npmci": {
"npmGlobalTools": []
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"projectType": "npm",

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@mojoio/paypal",
"version": "1.0.3",
"version": "1.0.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "@mojoio/paypal",
"private": "false",
"version": "1.0.3",
"private": false,
"version": "1.0.9",
"description": "mojoio PayPal API abstraction",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",

View File

@@ -5,14 +5,14 @@ import { Qenv } from '@pushrocks/qenv';
const testQenv = new Qenv('./', './.nogit/');
import * as smarttime from '@pushrocks/smarttime';
let testPayPalInstance: paypal.PayPal;
let testPayPalInstance: paypal.PayPalAccount;
tap.test('should create a valid paypal instance', async () => {
testPayPalInstance = new paypal.PayPal({
testPayPalInstance = new paypal.PayPalAccount({
clientId: testQenv.getEnvVarOnDemand('PAYPAL_CLIENT_ID'),
clientSecret: testQenv.getEnvVarOnDemand('PAYPAL_CLIENT_SECRET'),
});
expect(testPayPalInstance).to.be.instanceOf(paypal.PayPal);
expect(testPayPalInstance).to.be.instanceOf(paypal.PayPalAccount);
});
tap.test('should get an access token', async () => {

View File

@@ -5,7 +5,7 @@ export interface IPayPalOptions {
clientSecret: string;
}
export class PayPal {
export class PayPalAccount {
public apiBaseUrl: string = 'https://api.paypal.com'
public options: IPayPalOptions;

View File

@@ -1,5 +1,5 @@
import * as plugins from './paypal.plugins';
import { PayPal } from './paypal.classes.paypal';
import { PayPalAccount } from './paypal.classes.paypal';
export interface IPayPalOriginTransactionApiObject {
paypal_account_id: string;
@@ -26,7 +26,7 @@ export interface IPayPalTransactionOptions {
export class PayPalTransaction {
public static async getTransactionFor30days(
paypalInstanceArg: PayPal,
paypalInstanceArg: PayPalAccount,
startPointMillis: number = Date.now() - plugins.smarttime.units.days(30)
) {
const startDate = startPointMillis;