Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12b6a771a2 | |||
| ebf2796e0e |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mojoio/paypal",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mojoio/paypal",
|
||||
"private": false,
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "mojoio PayPal API abstraction",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user