From 8a7f895105d867d29d996dd817bad4b06721268b Mon Sep 17 00:00:00 2001 From: kashan siddiqui Date: Sat, 29 Feb 2020 16:27:11 +0500 Subject: [PATCH] routing error fixed --- app.module.ts | 24 --- package-lock.json | 212 +++++++++++++++++++++++++-- package.json | 2 + src/kraken/kraken.service.ts | 19 ++- src/nodemailer/nodemailer.service.ts | 19 +-- src/stripe/stripe.service.ts | 6 +- 6 files changed, 229 insertions(+), 53 deletions(-) delete mode 100644 app.module.ts diff --git a/app.module.ts b/app.module.ts deleted file mode 100644 index 80f2f56..0000000 --- a/app.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Module } from '@nestjs/common'; -import {MongooseModule} from '@nestjs/mongoose' -import { AppController } from './app.controller'; -import { AppService } from './app.service'; -import { ProductModule } from './products/product.module'; -import { StripeModule } from './stripe/stripe.module'; -import { NodemailerModule } from './nodemailer/nodemailer.module'; -import { AuthModule } from './auth/auth.module'; -import { PaypalModule } from './paypal/paypal.module'; - - - -@Module({ - imports: [ - ProductModule, - StripeModule, - NodemailerModule, - PaypalModule, - AuthModule, - MongooseModule.forRoot('mongodb+srv://hasanrasheed:Pass123456@cluster0-0kmmw.mongodb.net/test?retryWrites=true&w=majority')], - controllers: [AppController], - providers: [AppService], -}) -export class AppModule {} diff --git a/package-lock.json b/package-lock.json index ce79ef6..5709629 100644 --- a/package-lock.json +++ b/package-lock.json @@ -586,6 +586,36 @@ "axios": "0.19.0", "cli-color": "2.0.0", "uuid": "3.3.3" + }, + "dependencies": { + "axios": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", + "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", + "requires": { + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + } + } + } + }, + "@nestjs/config": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@nestjs/config/-/config-0.2.4.tgz", + "integrity": "sha512-XXr6jxL2E5v+zhtlpd3uAU9erDFd8Q/3Oyu6OdhkP7TCVX9erPVbZ4rpsw2qj4t+IeU0T9dYEGVHh6qy9piOEQ==", + "requires": { + "dotenv": "8.2.0", + "dotenv-expand": "5.1.0", + "lodash.get": "4.4.2", + "lodash.set": "4.3.2", + "uuid": "3.4.0" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } } }, "@nestjs/core": { @@ -1374,12 +1404,11 @@ "dev": true }, "axios": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", - "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", "requires": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" + "follow-redirects": "1.5.10" } }, "babel-code-frame": { @@ -1796,6 +1825,11 @@ } } }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, "buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -2456,6 +2490,14 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -2600,6 +2642,21 @@ "webidl-conversions": "^4.0.2" } }, + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + }, + "dotenv-expand": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", + "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -4195,6 +4252,34 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + } + } + }, "graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", @@ -4246,12 +4331,25 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, "has-symbols": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -4739,6 +4837,16 @@ } } }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -4762,11 +4870,15 @@ "has": "^1.0.3" } }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-symbol": { "version": "1.0.3", @@ -4923,6 +5035,15 @@ "html-escaper": "^2.0.0" } }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, "iterare": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz", @@ -5562,6 +5683,15 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, + "kraken-api": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/kraken-api/-/kraken-api-1.0.0.tgz", + "integrity": "sha512-JAfLh9Laks+2KZTM/WW+bpy+iZfImUok0aeLBOb0ehwTEGvcBWWAXlmkthhJXfUTSoOIHuoqqToC94+iBeBBAg==", + "requires": { + "got": "^7.1.0", + "qs": ">=6.4.0" + } + }, "left-pad": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", @@ -5643,6 +5773,11 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, "lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", @@ -5684,6 +5819,11 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=" + }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -5714,6 +5854,11 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -5939,6 +6084,11 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -6668,6 +6818,11 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, "p-each-series": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", @@ -6680,8 +6835,7 @@ "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, "p-limit": { "version": "2.2.2", @@ -6707,6 +6861,14 @@ "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", "dev": true }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "requires": { + "p-finally": "^1.0.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -6860,6 +7022,15 @@ } } }, + "paypal-rest-sdk": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/paypal-rest-sdk/-/paypal-rest-sdk-1.8.1.tgz", + "integrity": "sha512-Trj2GuPn10GqpICAxQh5wjxuDT7rq7DMOkvyatz05wI5xPGmqXN7UC0WfDSF9WSBs4YdcWZP0g+nY+sOdaFggw==", + "requires": { + "buffer-crc32": "^0.2.3", + "semver": "^5.0.3" + } + }, "pbkdf2": { "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", @@ -6927,6 +7098,11 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, "prettier": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", @@ -8394,6 +8570,11 @@ } } }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, "timers-browserify": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", @@ -8905,6 +9086,19 @@ } } }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", diff --git a/package.json b/package.json index 3a72714..0aa64a8 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,14 @@ }, "dependencies": { "@nestjs/common": "^6.7.2", + "@nestjs/config": "^0.2.4", "@nestjs/core": "^6.7.2", "@nestjs/mongoose": "^6.2.1", "@nestjs/platform-express": "^6.7.2", "axios": "^0.19.2", "bcryptjs": "^2.4.3", "jsonwebtoken": "^8.5.1", + "kraken-api": "^1.0.0", "mongoose": "^5.8.7", "nodemailer": "^6.4.2", "paypal-rest-sdk": "^1.8.1", diff --git a/src/kraken/kraken.service.ts b/src/kraken/kraken.service.ts index 6424e1f..ff9ae29 100644 --- a/src/kraken/kraken.service.ts +++ b/src/kraken/kraken.service.ts @@ -1,14 +1,17 @@ import { Injectable, NotFoundException } from '@nestjs/common'; const axios = require('axios'); const KrakenClient = require('kraken-api'); -const kraken = new KrakenClient('aHy3XTV0vIxt10AgaBeTtmRmTv3TwRm0IJqDPFqVFEgSlM1z7TTo9MsJ', 'kvkzBgWVzDl3XocRzjHcm64c4BSEH+L0nNXO1bkdJ1BH1QZkEX4BWWgXErU1YvFh40CyTo4nXx/SsJMMy0hVKA=='); +const kraken = new KrakenClient('', ''); @Injectable() export class KrakenService { // products: Product[] = []; constructor(){} - + J + + + //Function that return amount of 1btc in the given currency symbol getTickerInformation = async (symbol) => { try { @@ -16,8 +19,8 @@ export class KrakenService { // console.log(info.result['XXBTZUSD'].a[0], 'ask price') let url = `https://currency13.p.rapidapi.com/convert/${info.result['XXBTZUSD'].a[0]}/USD/${symbol}` let header = { - "x-rapidapi-host": "currency13.p.rapidapi.com", - "x-rapidapi-key": "aa522464damsh069405f3e3308e6p128bd9jsn13db25ed219c" + "x-rapidapi-host": "", + "x-rapidapi-key": "" } let result = await axios.get(url, {params: {}, headers: header}) //convert usd amount of 1btc to other currency const fiat= await this.getCurrencyRateOfAll(1,symbol) @@ -34,8 +37,8 @@ export class KrakenService { try { let url = `https://currency13.p.rapidapi.com/convert/${amount}/CAD/${symbol}` let header = { - "x-rapidapi-host": "currency13.p.rapidapi.com", - "x-rapidapi-key": "aa522464damsh069405f3e3308e6p128bd9jsn13db25ed219c" + "x-rapidapi-host": "", + "x-rapidapi-key": "" } let result = await axios.get(url, {params: {}, headers: header}) console.log(result.data, 'amount3') @@ -55,8 +58,8 @@ export class KrakenService { try { let url = `https://currency13.p.rapidapi.com/convert/${amount}/${symbol}/CAD` let header = { - "x-rapidapi-host": "currency13.p.rapidapi.com", - "x-rapidapi-key": "aa522464damsh069405f3e3308e6p128bd9jsn13db25ed219c" + "x-rapidapi-host": "", + "x-rapidapi-key": "" } let result = await axios.get(url, {params: {}, headers: header}) console.log(result.data, 'amount3') diff --git a/src/nodemailer/nodemailer.service.ts b/src/nodemailer/nodemailer.service.ts index 11b5e54..b0522dc 100644 --- a/src/nodemailer/nodemailer.service.ts +++ b/src/nodemailer/nodemailer.service.ts @@ -6,17 +6,18 @@ const nodemailer = require('nodemailer'); //nodemailer configuration + let transporter = nodemailer.createTransport({ host: 'smtp.gmail.com', port: 465, secure: true, auth: { type: 'OAuth2', - user: 'admin@abods.tech', - clientId: '929435037368-dcq09pfgun4uheos6jliv1oak5brf1r3.apps.googleusercontent.com', - clientSecret: 'RqT639s_upCnzahI62V0Bflq', - refreshToken: '1//04cgkdjKzCkp5CgYIARAAGAQSNwF-L9Ir83eayH7Z0OM_fw8dtQl5Wdfqt07hS7qUs5izJzXDJo6eUBaDqi2GclIoCK7f-8BimWI', - accessToken: 'ya29.Il-6B4HbgD5Fjc5w73LXg712UBUsOZE0y8MQk6P9v-nKrV4t2O1qYCONyUGQwfEdrBU9UR7k_MjGR7PapHyN9TctNzM1Qf9DykCDZ0yx68lMFlC0g-Kkyc5Lwdh9hYdfhQ', + user: '', + clientId: '', + clientSecret: '', + refreshToken: '', + accessToken: '', expires: 3599 } }); @@ -32,8 +33,8 @@ export class NodemailerService { try { let info = await transporter.sendMail({ - from: 'no-reply@crypto.farm', // sender address - to: "kashanzahoorsiddiqui@gmail.com,"+`${invoiceData.payerEmail}`,//receiver email + from: '', // sender address + to: ""+`${invoiceData.payerEmail}`,//receiver email subject: 'Receipt of Crypto Delivery Payment '+`${invoiceData.payerID}`, // Subject line html: `

************Paid Invoice***************

@@ -100,8 +101,8 @@ export class NodemailerService { try { let info = await transporter.sendMail({ - from: 'no-reply@crypto.farm', // sender address - to: "payments@abods.tech,kashanzahoorsiddiqui@gmail.com",//receiver email + from: '', // sender address + to: "",//receiver email subject: 'Receipt of Crypto Delivery Payment ' +`${invoiceData.payerID}`, // Subject line html: `

************Paid Invoice***************

diff --git a/src/stripe/stripe.service.ts b/src/stripe/stripe.service.ts index fbab205..38c0102 100644 --- a/src/stripe/stripe.service.ts +++ b/src/stripe/stripe.service.ts @@ -8,14 +8,14 @@ const {promisify} = require('util'); export class StripeService { constructor(){} - + //get stripe supported currencies getListOfCurrencies = async () => { try { let url = "https://currency13.p.rapidapi.com/list" let header = { - "x-rapidapi-host": "currency13.p.rapidapi.com", - "x-rapidapi-key": "aa522464damsh069405f3e3308e6p128bd9jsn13db25ed219c" + "x-rapidapi-host": "", + "x-rapidapi-key": "" } const currencies = [] let result = await axios.get(url, {params: {}, headers: header})