@commercetools/connect-payments-sdk 0.25.0 → 0.25.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @commercetools/connect-payments-sdk
2
2
 
3
+ ## 0.25.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ad4c0d7: fix(payments): extract checkoutTransactionItemId from session
8
+
3
9
  ## 0.25.0
4
10
 
5
11
  ### Minor Changes
@@ -19,6 +19,7 @@ export declare class DefaultSessionService implements SessionService {
19
19
  getAllowedPaymentMethodsFromSession(session: Session): string[];
20
20
  getProcessorUrlFromSession(session: Session): string;
21
21
  getPaymentInterfaceFromSession(session: Session): string | undefined;
22
+ getCheckoutTransactionItemIdFromSession(session: Session): string | undefined;
22
23
  getMerchantReturnUrlFromSession(session: Session): string | undefined;
23
24
  getFutureOrderNumberFromSession(session: Session): string | undefined;
24
25
  getGiftCardPlannedAmountFromSession(session: Session): Money | undefined;
@@ -69,6 +69,9 @@ class DefaultSessionService {
69
69
  getPaymentInterfaceFromSession(session) {
70
70
  return session.metadata?.paymentInterface;
71
71
  }
72
+ getCheckoutTransactionItemIdFromSession(session) {
73
+ return session.metadata?.checkoutTransactionItemId;
74
+ }
72
75
  getMerchantReturnUrlFromSession(session) {
73
76
  return session.metadata?.merchantReturnUrl;
74
77
  }
@@ -28,6 +28,7 @@ export interface SessionService {
28
28
  getAllowedPaymentMethodsFromSession(session: Session): string[];
29
29
  getProcessorUrlFromSession(session: Session): string;
30
30
  getPaymentInterfaceFromSession(session: Session): string | undefined;
31
+ getCheckoutTransactionItemIdFromSession(session: Session): string | undefined;
31
32
  getMerchantReturnUrlFromSession(session: Session): string | undefined;
32
33
  getFutureOrderNumberFromSession(session: Session): string | undefined;
33
34
  getGiftCardPlannedAmountFromSession(session: Session): Money | undefined;
@@ -19,6 +19,7 @@ class SessionHeaderAuthenticationManager {
19
19
  allowedPaymentMethods: this.sessionService.getAllowedPaymentMethodsFromSession(session),
20
20
  processorUrl: this.sessionService.getProcessorUrlFromSession(session),
21
21
  paymentInterface: this.sessionService.getPaymentInterfaceFromSession(session),
22
+ checkoutTransactionItemId: this.sessionService.getCheckoutTransactionItemIdFromSession(session),
22
23
  merchantReturnUrl: this.sessionService.getMerchantReturnUrlFromSession(session),
23
24
  futureOrderNumber: this.sessionService.getFutureOrderNumberFromSession(session),
24
25
  giftCardPlannedAmount: this.sessionService.getGiftCardPlannedAmountFromSession(session),
@@ -19,6 +19,7 @@ class SessionQueryParamAuthenticationManager {
19
19
  allowedPaymentMethods: this.sessionService.getAllowedPaymentMethodsFromSession(session),
20
20
  processorUrl: this.sessionService.getProcessorUrlFromSession(session),
21
21
  paymentInterface: this.sessionService.getPaymentInterfaceFromSession(session),
22
+ checkoutTransactionItemId: this.sessionService.getCheckoutTransactionItemIdFromSession(session),
22
23
  merchantReturnUrl: this.sessionService.getMerchantReturnUrlFromSession(session),
23
24
  futureOrderNumber: this.sessionService.getFutureOrderNumberFromSession(session),
24
25
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools/connect-payments-sdk",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Payment SDK for commercetools payment connectors",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",