File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
generator/cybersource-javascript-template Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 381381
382382 var token = AuthenticationSDK.Authorization.getToken(this.merchantConfig, this.logger);
383383
384+ var clientId = getClientId();
385+
386+ headerParams[' v-c-client-id' ] = clientId;
387+
388+ // if (this.merchantConfig.getSolutionId() != null && this.merchantConfig.getSolutionId() != ' ' ) {
389+ // headerParams[' v-c-solution-id' ] = this.merchantConfig.getSolutionId();
390+ // }
391+
384392 if (this.merchantConfig.getAuthenticationType().toLowerCase() === this.constants.JWT) {
385393 token = ' Bearer ' + token;
386394 headerParams[' Authorization' ] = token;
414422
415423 return headerParams;
416424 }
425+
426+ function getClientId() {
427+ var packageInfo = require(' ./../package.json' );
428+ return " cybs-rest-sdk-node-" + packageInfo.version;
429+ }
417430
418431{ {#emitJSDoc} }{ {^usePromises} } /**
419432 * Callback function to receive the result of the operation.
452465 var proxyUser = this.merchantConfig.getProxyUser();
453466 var proxyPassword = this.merchantConfig.getProxyPassword();
454467
455- var request = superagent(httpMethod, url);
468+ var request = superagent(httpMethod, url);
456469
457470 if (useProxy && (proxyAddress != null && proxyAddress != ' ' )) {
458471 require(' superagent-proxy' )(require(' superagent' ));
You can’t perform that action at this time.
0 commit comments