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

Angular not working module #22

Open
paintsis opened this issue Jul 17, 2019 · 3 comments
Open

Angular not working module #22

paintsis opened this issue Jul 17, 2019 · 3 comments

Comments

@paintsis
Copy link

Testing module in Angular7.

Module not found: Error: Can't resolve 'model/VoidCaptureRequest' in '/home/sgonzalez/Documents/angular/aguas/node_modules/cybersource-rest-client/src'
ERROR in ./node_modules/cybersource-rest-client/src/index.js
Module not found: Error: Can't resolve 'model/VoidCreditRequest' in '/home/sgonzalez/Documents/angular/aguas/node_modules/cybersource-rest-client/src'
ERROR in ./node_modules/cybersource-rest-client/src/index.js
Module not found: Error: Can't resolve 'model/VoidPaymentRequest' in '/home/sgonzalez/Documents/angular/aguas/node_modules/cybersource-rest-client/src'
ERROR in ./node_modules/cybersource-rest-client/src/index.js
Module not found: Error: Can't resolve 'model/VoidRefundRequest' in '/home/sgonzalez/Documents/angular/aguas/node_modules/cybersource-rest-client/src'

@snavinch
Copy link
Contributor

  • Can you please provide steps to reproduce?
  • Can you also check the version of the SDK?
  • Also, can you tell us where you are running the SDK from? (If this is run from custom code, let us know. We may need to go through that offline.)

@paintsis
Copy link
Author

Hi.
Can you please provide steps to reproduce?
when importing libraries and declared the configObject and instance variable, I am using angular 7

import {cybersourceRestApi} from 'cybersource-rest-client';

 let configObject = Configuracion();
 let instance = new cybersourceRestApi.PaymentsApi(configObject);

Can you also check the version of the SDK?
[email protected]
[email protected]

Also, can you tell us where you are running the SDK from? (If this is run from custom code, let us know. We may need to go through that offline.)

I am running it from an angular component of typescript

@snavinch
Copy link
Contributor

We understand you are trying to use the SDK inside your Angular app, but Angular runs on client side and these SDKs are not designed to be used on client side, these are server side SDKs and you will need to have your own backend.
You need your own server side component which will be communication to CyberSource, and you can use these SDKs to build this backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants