Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2e test webhook #365

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update product.js
  • Loading branch information
ankitdas13 authored Aug 1, 2023
commit 532a5e8eda635b122af9c1c1ea0ef9cc646f9bb0
21 changes: 19 additions & 2 deletions test_prod/product.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
'use strict';

const Razorpay = require("../dist/razorpay");
let request = require('request-promise');

module.exports = new Razorpay({
class RazorpayBeta extends Razorpay {
constructor(options) {
super(options)
this.api.rq = request.defaults({
baseUrl: options.hostUrl,
json: true,
auth: {
user: options.key_id,
pass: options.key_secret
}
})
}
}


module.exports = new RazorpayBeta({
key_id: process.env.PRODUCT_API_KEY || "",
key_secret: process.env.PRODUCT_API_SECRET || ""
key_secret: process.env.PRODUCT_API_SECRET || "",
hostUrl : "https://api-web.dev.razorpay.in"
});