Skip to content

Commit

Permalink
Merge pull request #74 from semics-tech/patch-1
Browse files Browse the repository at this point in the history
optional null value for callbackUrl
  • Loading branch information
nishekh-e-r authored Feb 9, 2023
2 parents 0060754 + 5c2c8b6 commit 9b67fde
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/services/stripeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ module.exports = ({ strapi }) => ({
async sendDataToCallbackUrl(session) {
try {
const stripeSettings = await this.initialize();

// Return if no callbackUrl is set
if (!stripeSettings.callbackUrl) return;

await axiosInstance.post(stripeSettings.callbackUrl, session);
} catch (error) {
throw new ApplicationError(error.message);
Expand Down

0 comments on commit 9b67fde

Please sign in to comment.