Skip to content

Commit

Permalink
refactor: change header from deprecated Content-language to Accept-La…
Browse files Browse the repository at this point in the history
…nguage (#17830)

CXSPA-4688
  • Loading branch information
FollowTheFlo authored Sep 13, 2023
1 parent 5edbc54 commit 06048eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions integration-libs/opf/base/occ/adapters/occ-opf.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import {
backOff,
ConverterService,
backOff,
isJaloError,
normalizeHttpError,
} from '@spartacus/core';
import {
OpfEndpointsService,
OpfPaymentAdapter,
OPF_PAYMENT_SUBMIT_COMPLETE_NORMALIZER,
OPF_PAYMENT_SUBMIT_NORMALIZER,
OPF_PAYMENT_VERIFICATION_NORMALIZER,
OpfEndpointsService,
OpfPaymentAdapter,
} from '@spartacus/opf/base/core';
import {
OPF_CC_OTP_KEY,
OPF_CC_PUBLIC_KEY,
OpfConfig,
OpfPaymentVerificationPayload,
OpfPaymentVerificationResponse,
OPF_CC_OTP_KEY,
OPF_CC_PUBLIC_KEY,
SubmitCompleteRequest,
SubmitCompleteResponse,
SubmitRequest,
Expand All @@ -46,7 +46,7 @@ export class OccOpfPaymentAdapter implements OpfPaymentAdapter {
header: { [name: string]: string } = {
accept: 'application/json',
'Content-Type': 'application/json',
'Content-Language': 'en-us',
'Accept-Language': 'en-us',
};

verifyPayment(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class OccOpfAdapter implements OpfAdapter {
paymentConfig: PaymentInitiationConfig
): Observable<PaymentSessionData> {
const headers = new HttpHeaders({
'Content-Language': 'en-us',
'Accept-Language': 'en-us',
})
.set(OPF_CC_PUBLIC_KEY, this.config.opf?.commerceCloudPublicKey || '')
.set(OPF_CC_OTP_KEY, paymentConfig?.otpKey || '');
Expand Down

0 comments on commit 06048eb

Please sign in to comment.