diff --git a/README.md b/README.md index 9fd4b18..21628ce 100644 --- a/README.md +++ b/README.md @@ -75,83 +75,83 @@ FieldLevelEncryptionConfig config = FieldLevelEncryptionConfigBuilder.aFieldLeve .build(); ``` -See also: +See also: - [Securing Sensitive Data Using Payload Encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/). ## Configuration -1. Create your account on [Mastercard Developers](https://sandbox.api.mastercard.com/) if you don't have it already. +1. Create your account on [Mastercard Developers](https://developer.mastercard.com/) if you don't have it already. 2. Create a new project here and add ***Carbon Calculator Experience*** to it and click continue. 3. Download Sandbox Signing Key, a ```.p12``` file will be downloaded. Use this file for payload encryption. 4. Download mastercard Signing Key, a ```mc.p12``` file will be downloaded. Use this file for payload decryption. -5. In the Client Encryption Keys section of the dashboard, click on the ```Actions``` dropdown and download the client encryption key, a ``.pem``` file will be downloaded. +5. In the Client Encryption Keys section of the dashboard, click on the ```Actions``` dropdown and download the client encryption key, a ``.pem`` file will be downloaded. 6. Copy the downloaded ```.p12``` , ```mc.p12``` and ```.pem``` files to ```src/main/resources``` folder in your code. 7. Open ```src/main/resources/application.yml``` and configure: - ```mastercard.api.environment.basepath ```- Path to sandbox endpoint,for example for Sandbox https://sandbox.api.mastercard.com/cts - - ```mastercard.api.environment.key-file ```- Path to keystore (.p12) file, just change the name as per the downloaded file in step 5. + - ```mastercard.api.environment.key-file ```- Path to keystore (.p12) file, just change the name as per the downloaded file in step 5. - ```mastercard.api.authentication.consumer-key``` - Copy the Consumer key from "Sandbox/Production Keys" section on your project page - ```mastercard.api.authentication.keystore-alias``` - Alias of your key. Default key alias for sandbox is ```keyalias```. - ```mastercard.api.authentication.keystore-password``` - Password of your Keystore. Default keystore password for sandbox project is ```keystorepassword```. - - ```mastercard.api.encryption.key-file ```- Path to encryption key (.pem) file, just change the name as per the downloaded file in step 5. - ```mastercard.api.encryption.fingerprint ```- Fingerprint, copy the fingerprint from Client Encryption Keys section. If you have multiple client encryption keys then copy the fingerprint of the key which you want to use. + - ```mastercard.api.encryption.key-file ```- Path to encryption key (.pem) file, just change the name as per the downloaded file in step 5. + ```mastercard.api.encryption.fingerprint ```- Fingerprint, copy the fingerprint from Client Encryption Keys section. If you have multiple client encryption keys then copy the fingerprint of the key which you want to use. ## Use-Cases 1. **Get Webview URL**
-endpoint "/issuers/users/{userid}/dashboards" -Use this endpoint to get a new token with expiry specified. Language code "lang=en-US" can be passed as query parameter (Not mandatory). Supported lang "en-US,es-419,sv,es-CL,es-CR,pl-PL". Default is "en-US". + endpoint "/issuers/users/{userid}/dashboards" + Use this endpoint to get a new token with expiry specified. Language code "lang=en-US" can be passed as query parameter (Not mandatory). Supported lang "en-US,es-419,sv,es-CL,es-CR,pl-PL,ms-MY". Default is "en-US". -2. **Get Current Months Carbon Score**
-endpoint "/issuers/users/{userid}/aggregate-carbon-scores"
-Use this endpoint to display the current months' carbon score, to provide a snapshot of their score prior to opening the dashboard. +2. **Get Current Months Carbon Score**
+ endpoint "/issuers/users/{userid}/aggregate-carbon-scores"
+ Use this endpoint to display the current months' carbon score, to provide a snapshot of their score prior to opening the dashboard. 3. **Enroll User**
-endpoint "/issuers/users"
-Use this endpoint to enrol their customers onto Carbon Calculator Experience platform. -Donate feature toggle, which allows the issuer to disable the donate feature during onboarding. -If the issuer has opted for the Donation feature then the fields - *name, billing address, email, locale, cardholder name, card number, card base currency and card expiry date* fields are **mandatory** in the payload. + endpoint "/issuers/users"
+ Use this endpoint to enrol their customers onto Carbon Calculator Experience platform. + Donate feature toggle, which allows the issuer to disable the donate feature during onboarding. + If the issuer has opted for the Donation feature then the fields - *name, billing address, email, locale, cardholder name, card number, card base currency and card expiry date* fields are **mandatory** in the payload. 4. **Get Issuer**
-endpoint "/issuers"
-Use this endpoint to fetch issuer details onboarded to Carbon Calculator Experience platform. + endpoint "/issuers"
+ Use this endpoint to fetch issuer details onboarded to Carbon Calculator Experience platform. 5. **Delete User**
-endpoint "/issuers/user-deletions"
-Use this endpoint to delete user registered to Carbon Calculator Experience platform. + endpoint "/issuers/user-deletions"
+ Use this endpoint to delete user registered to Carbon Calculator Experience platform. 6. **Update Issuer**
-endpoint "/issuers"
-Use this endpoint to update issuer details onboarded to Carbon Calculator Experience Platform. -This endpoint is not supported when the Donate feature for your bank is disabled. + endpoint "/issuers"
+ Use this endpoint to update issuer details onboarded to Carbon Calculator Experience Platform. + This endpoint is not supported when the Donate feature for your bank is disabled. -More details can be found [here](https://stage.developer.mastercard.com/drafts/priceless-planet-carbon-tracker/staging/documentation/use-cases/). +More details can be found [here](https://developer.mastercard.com/priceless-planet-carbon-tracker/documentation/use-cases/). ## Execute the Use-Cases 1. Run ```mvn clean install``` from the root of the project directory. 2. There are two ways to execute the use-cases: - 1. Execute the use-cases(test cases): + 1. Execute the use-cases(test cases): - Run ```mvn clean install``` from the root of the project directory. - When the project builds successfully, you can run the following command to start the project: - java -jar target/carbon-tracker-0.0.1-SNAPSHOT.jar + java -jar target/carbon-tracker-0.0.1-SNAPSHOT.jar - Above command will start the application and execute all the use cases mentioned in readme file - - 2. Use REST API based Client( such as [Insomnia](https://insomnia.rest/download/core/) or [Postman](https://www.postman.com/downloads/)) - - Run ```mvn spring-boot:run``` command to run the application. - - Use any REST API based Client to test the functionality. Below are the APIs exposed by this application ,use locahost:8080 as the Host:
- - GET {Host}/cts/issuers/users/{userid}/dashboards
- - GET {Host}/cts/issuers/users/{userid}/aggregate-carbon-scores
- - GET {HOST}/cts/issuers
- - POST {HOST}/cts/issuers/users
- - PUT {HOST}/cts/issuers
- - POST {HOST}/cts/issuers/user-deletions
- - + + 2. Use REST API based Client( such as [Insomnia](https://insomnia.rest/download/core/) or [Postman](https://www.postman.com/downloads/)) + - Run ```mvn spring-boot:run``` command to run the application. + - Use any REST API based Client to test the functionality. Below are the APIs exposed by this application ,use locahost:8080 as the Host:
+ - GET {HOST}/cts/issuers/users/{userid}/dashboards
+ - GET {HOST}/cts/issuers/users/{userid}/aggregate-carbon-scores
+ - GET {HOST}/cts/issuers
+ - POST {HOST}/cts/issuers/users
+ - PUT {HOST}/cts/issuers
+ - POST {HOST}/cts/issuers/user-deletions
+ + ## Service Documentation -Carbon Calculator Experience documentation can be found [here](https://stage.developer.mastercard.com/drafts/priceless-planet-carbon-tracker/staging/documentation/use-cases/). +Carbon Calculator Experience documentation can be found [here](https://developer.mastercard.com/priceless-planet-carbon-tracker/documentation/use-cases/). ## API Reference -The Swagger API specification can be found [here](https://stage.developer.mastercard.com/drafts/priceless-planet-carbon-tracker/staging/documentation/api-reference/). +The Swagger API specification can be found [here](https://developer.mastercard.com/priceless-planet-carbon-tracker/documentation/api-reference/). ## Support Please send an email to **apisupport@mastercard.com** with any questions or feedback you may have. diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index dfa8aa0..0f4b7d2 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -16,4 +16,4 @@ mastercard: binRange: #Bin range for the given issuer -lang: en-US #Provide language code in which webview should be rendered. Supported lang "en-US,es-419,sv,es-CL,es-CR,pl-PL". Default is "en-US" . +lang: en-US #Provide language code in which webview should be rendered. Supported lang "en-US,es-419,sv,es-CL,es-CR,pl-PL,ms-MY". Default is "en-US" .