Skip to content

Commit

Permalink
Merge pull request #43 from zoop/optional-customer-display-name
Browse files Browse the repository at this point in the history
  • Loading branch information
thefoodiecoder authored Mar 21, 2022
2 parents fabc506 + 0fc9433 commit 2af5ea2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,6 @@ const gatewayModes = Object.freeze({
};

zoop.eSignGatewayInit = function (gatewayOption) {
// Validation of gateway if it's required through error.....if it's optional then assign default value
if (zoop.isNullUndefinedOrEmpty(gatewayOption.company_display_name)) {
throw new Error(
"Customer display name is mandatory to initiate gateway."
);
}
zoop.esignGatewayOptions.company_display_name =
gatewayOption.company_display_name;
zoop.esignGatewayOptions.color_bg = zoop.check(gatewayOption, "color_bg")
Expand Down Expand Up @@ -236,10 +230,16 @@ const gatewayModes = Object.freeze({
);
}
zoop.esignGatewayOptions.transaction_id = transaction_id;
if (
zoop.isNullUndefinedOrEmpty(zoop.esignGatewayOptions.company_display_name)
) {
throw new Error("Company Display Name is mandatory in gateway options.");
if (version == "v3") {
if (
zoop.isNullUndefinedOrEmpty(
zoop.esignGatewayOptions.company_display_name
)
) {
throw new Error(
"Company Display Name is mandatory in gateway options."
);
}
}

switch (version) {
Expand Down
2 changes: 1 addition & 1 deletion zoop-sdk.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2af5ea2

Please sign in to comment.