@commercetools/connect-payments-sdk 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/commercetools/services/ct-session.service.d.ts +1 -0
- package/dist/commercetools/services/ct-session.service.js +3 -0
- package/dist/commercetools/types/session.type.d.ts +1 -0
- package/dist/security/authn/session-header-authn-manager.js +1 -0
- package/dist/security/authn/session-query-param-authn-manager.js +1 -0
- package/dist/security/authn/types/authn.type.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -19,5 +19,6 @@ export declare class DefaultSessionService implements SessionService {
|
|
|
19
19
|
getProcessorUrlFromSession(session: Session): string;
|
|
20
20
|
getPaymentInterfaceFromSession(session: Session): string | undefined;
|
|
21
21
|
getMerchantReturnUrlFromSession(session: Session): string | undefined;
|
|
22
|
+
getFutureOrderNumberFromSession(session: Session): string | undefined;
|
|
22
23
|
private getSession;
|
|
23
24
|
}
|
|
@@ -72,6 +72,9 @@ class DefaultSessionService {
|
|
|
72
72
|
getMerchantReturnUrlFromSession(session) {
|
|
73
73
|
return session.metadata?.merchantReturnUrl;
|
|
74
74
|
}
|
|
75
|
+
getFutureOrderNumberFromSession(session) {
|
|
76
|
+
return session.metadata?.futureOrderNumber;
|
|
77
|
+
}
|
|
75
78
|
async getSession(sessionId) {
|
|
76
79
|
return await fetch(`${this.sessionUrl}/${this.projectKey}/sessions/${sessionId}`, {
|
|
77
80
|
method: 'GET',
|
|
@@ -28,4 +28,5 @@ export interface SessionService {
|
|
|
28
28
|
getProcessorUrlFromSession(session: Session): string;
|
|
29
29
|
getPaymentInterfaceFromSession(session: Session): string | undefined;
|
|
30
30
|
getMerchantReturnUrlFromSession(session: Session): string | undefined;
|
|
31
|
+
getFutureOrderNumberFromSession(session: Session): string | undefined;
|
|
31
32
|
}
|
|
@@ -20,6 +20,7 @@ class SessionHeaderAuthenticationManager {
|
|
|
20
20
|
processorUrl: this.sessionService.getProcessorUrlFromSession(session),
|
|
21
21
|
paymentInterface: this.sessionService.getPaymentInterfaceFromSession(session),
|
|
22
22
|
merchantReturnUrl: this.sessionService.getMerchantReturnUrlFromSession(session),
|
|
23
|
+
futureOrderNumber: this.sessionService.getFutureOrderNumberFromSession(session),
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
catch (e) {
|
|
@@ -20,6 +20,7 @@ class SessionQueryParamAuthenticationManager {
|
|
|
20
20
|
processorUrl: this.sessionService.getProcessorUrlFromSession(session),
|
|
21
21
|
paymentInterface: this.sessionService.getPaymentInterfaceFromSession(session),
|
|
22
22
|
merchantReturnUrl: this.sessionService.getMerchantReturnUrlFromSession(session),
|
|
23
|
+
futureOrderNumber: this.sessionService.getFutureOrderNumberFromSession(session),
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools/connect-payments-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Payment SDK for commercetools payment connectors",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
],
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@commercetools-backend/loggers": "22.
|
|
19
|
-
"@commercetools/platform-sdk": "7.
|
|
18
|
+
"@commercetools-backend/loggers": "22.35.0",
|
|
19
|
+
"@commercetools/platform-sdk": "7.18.0",
|
|
20
20
|
"@commercetools/sdk-client-v2": "2.5.0",
|
|
21
21
|
"jsonwebtoken": "9.0.2",
|
|
22
22
|
"jwks-rsa": "3.1.0",
|