Skip to content

Commit f594fb6

Browse files
authoredJun 20, 2022
Merge pull request #85 from CyberSource/june-22-release
June 22 release
2 parents 3384807 + 8256288 commit f594fb6

File tree

76 files changed

+2211
-192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2211
-192
lines changed
 

‎CyberSource/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@
190190
from .models.pts_v2_payments_post201_response_payment_information_bank_account import PtsV2PaymentsPost201ResponsePaymentInformationBankAccount
191191
from .models.pts_v2_payments_post201_response_payment_information_instrument_identifier import PtsV2PaymentsPost201ResponsePaymentInformationInstrumentIdentifier
192192
from .models.pts_v2_payments_post201_response_payment_information_tokenized_card import PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard
193+
from .models.pts_v2_payments_post201_response_payment_insights_information import PtsV2PaymentsPost201ResponsePaymentInsightsInformation
194+
from .models.pts_v2_payments_post201_response_payment_insights_information_response_insights import PtsV2PaymentsPost201ResponsePaymentInsightsInformationResponseInsights
193195
from .models.pts_v2_payments_post201_response_point_of_sale_information import PtsV2PaymentsPost201ResponsePointOfSaleInformation
194196
from .models.pts_v2_payments_post201_response_point_of_sale_information_emv import PtsV2PaymentsPost201ResponsePointOfSaleInformationEmv
195197
from .models.pts_v2_payments_post201_response_processing_information import PtsV2PaymentsPost201ResponseProcessingInformation
@@ -491,6 +493,7 @@
491493
from .models.riskv1addressverifications_order_information_line_items import Riskv1addressverificationsOrderInformationLineItems
492494
from .models.riskv1addressverifications_order_information_ship_to import Riskv1addressverificationsOrderInformationShipTo
493495
from .models.riskv1authenticationresults_consumer_authentication_information import Riskv1authenticationresultsConsumerAuthenticationInformation
496+
from .models.riskv1authenticationresults_device_information import Riskv1authenticationresultsDeviceInformation
494497
from .models.riskv1authenticationresults_order_information import Riskv1authenticationresultsOrderInformation
495498
from .models.riskv1authenticationresults_order_information_amount_details import Riskv1authenticationresultsOrderInformationAmountDetails
496499
from .models.riskv1authenticationresults_order_information_line_items import Riskv1authenticationresultsOrderInformationLineItems
@@ -662,6 +665,7 @@
662665
from .models.tss_v2_transactions_get200_response_point_of_sale_information import TssV2TransactionsGet200ResponsePointOfSaleInformation
663666
from .models.tss_v2_transactions_get200_response_processing_information import TssV2TransactionsGet200ResponseProcessingInformation
664667
from .models.tss_v2_transactions_get200_response_processing_information_authorization_options import TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptions
668+
from .models.tss_v2_transactions_get200_response_processing_information_authorization_options_initiator import TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptionsInitiator
665669
from .models.tss_v2_transactions_get200_response_processing_information_bank_transfer_options import TssV2TransactionsGet200ResponseProcessingInformationBankTransferOptions
666670
from .models.tss_v2_transactions_get200_response_processing_information_japan_payment_options import TssV2TransactionsGet200ResponseProcessingInformationJapanPaymentOptions
667671
from .models.tss_v2_transactions_get200_response_processor_information import TssV2TransactionsGet200ResponseProcessorInformation
@@ -681,14 +685,16 @@
681685
from .models.tss_v2_transactions_post201_response__embedded_buyer_information import TssV2TransactionsPost201ResponseEmbeddedBuyerInformation
682686
from .models.tss_v2_transactions_post201_response__embedded_client_reference_information import TssV2TransactionsPost201ResponseEmbeddedClientReferenceInformation
683687
from .models.tss_v2_transactions_post201_response__embedded_consumer_authentication_information import TssV2TransactionsPost201ResponseEmbeddedConsumerAuthenticationInformation
684-
from .models.tss_v2_transactions_post201_response__embedded_device_information import TssV2TransactionsPost201ResponseEmbeddedDeviceInformation
685688
from .models.tss_v2_transactions_post201_response__embedded__links import TssV2TransactionsPost201ResponseEmbeddedLinks
686689
from .models.tss_v2_transactions_post201_response__embedded_merchant_information import TssV2TransactionsPost201ResponseEmbeddedMerchantInformation
687690
from .models.tss_v2_transactions_post201_response__embedded_order_information import TssV2TransactionsPost201ResponseEmbeddedOrderInformation
688691
from .models.tss_v2_transactions_post201_response__embedded_order_information_bill_to import TssV2TransactionsPost201ResponseEmbeddedOrderInformationBillTo
689692
from .models.tss_v2_transactions_post201_response__embedded_order_information_ship_to import TssV2TransactionsPost201ResponseEmbeddedOrderInformationShipTo
690693
from .models.tss_v2_transactions_post201_response__embedded_payment_information import TssV2TransactionsPost201ResponseEmbeddedPaymentInformation
694+
from .models.tss_v2_transactions_post201_response__embedded_payment_information_bank import TssV2TransactionsPost201ResponseEmbeddedPaymentInformationBank
695+
from .models.tss_v2_transactions_post201_response__embedded_payment_information_bank_account import TssV2TransactionsPost201ResponseEmbeddedPaymentInformationBankAccount
691696
from .models.tss_v2_transactions_post201_response__embedded_payment_information_card import TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard
697+
from .models.tss_v2_transactions_post201_response__embedded_payment_information_customer import TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCustomer
692698
from .models.tss_v2_transactions_post201_response__embedded_payment_information_payment_type import TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentType
693699
from .models.tss_v2_transactions_post201_response__embedded_point_of_sale_information import TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformation
694700
from .models.tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner import TssV2TransactionsPost201ResponseEmbeddedPointOfSaleInformationPartner

‎CyberSource/logging/sensitive_formatter.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,66 +20,66 @@ def _filter(s):
2020
s = re.sub(r'keyid="[-.A-Za-z0-9+/= ]+"', r'keyid="xxxxxxxx"', s)
2121

2222
# masking cardNumber
23-
matches = re.search(r'"cardNumber":"((\s*[0-9]\s*)+)"', s)
23+
matches = re.search(r'"cardNumber":"(((\s*[s/-]*\s*)+[0-9](\s*[s/-]*\s*)+)+)"', s)
2424
if matches:
2525
matchedString= matches.group(0)
2626
matchString= matchedString.replace(" ","")
27+
matchString= matchString.replace("-","")
2728
pats = re.findall(r'"cardNumber":"[0-9]+"', matchString)
2829
if len(pats) > 0:
2930
pat = pats[0]
30-
pat.replace(" ", "")
3131
pat = re.sub(r'[0-9](?=.*.{5})', r'x', pat)
3232
replaceString = re.sub(r'"cardNumber":"[0-9]+"', pat, matchString)
3333
s=s.replace(matchedString,replaceString)
3434

3535
# masking number
36-
matches = re.search(r'"number":"((\s*[0-9]\s*)+)"', s)
36+
matches = re.search(r'"number":"(((\s*[s/-]*\s*)+[0-9](\s*[s/-]*\s*)+)+)"', s)
3737
if matches:
3838
matchedString= matches.group(0)
3939
matchString= matchedString.replace(" ","")
40+
matchString= matchString.replace("-","")
4041
pats = re.findall(r'"number":"[0-9]+"', matchString)
4142
if len(pats) > 0:
4243
pat = pats[0]
43-
pat.replace(" ", "")
4444
pat = re.sub(r'[0-9](?=.*.{5})', r'x', pat)
4545
replaceString = re.sub(r'"number":"[0-9]+"', pat, matchString)
4646
s=s.replace(matchedString,replaceString)
4747

4848
# masking account
49-
matches = re.search(r'"account":"((\s*[0-9]\s*)+)"', s)
49+
matches = re.search(r'"account":"(((\s*[s/-]*\s*)+[0-9](\s*[s/-]*\s*)+)+)"', s)
5050
if matches:
5151
matchedString= matches.group(0)
5252
matchString= matchedString.replace(" ","")
53+
matchString= matchString.replace("-","")
5354
pats = re.findall(r'"account":"[0-9]+"', matchString)
5455
if len(pats) > 0:
5556
pat = pats[0]
56-
pat.replace(" ", "")
5757
pat = re.sub(r'[0-9](?=.*.{5})', r'x', pat)
5858
replaceString = re.sub(r'"account":"[0-9]+"', pat, matchString)
5959
s=s.replace(matchedString,replaceString)
6060

6161
# masking prefix
62-
matches = re.search(r'"prefix":"((\s*[0-9]\s*)+)"', s)
62+
matches = re.search(r'"prefix":"(((\s*[s/-]*\s*)+[0-9](\s*[s/-]*\s*)+)+)"', s)
6363
if matches:
6464
matchedString= matches.group(0)
6565
matchString= matchedString.replace(" ","")
66+
matchString= matchString.replace("-","")
6667
pats = re.findall(r'"prefix":"[0-9]+"', matchString)
6768
if len(pats) > 0:
6869
pat = pats[0]
69-
pat.replace(" ", "")
7070
pat = re.sub(r'(?<=["])([0-9]{6})', r'x', pat)
7171
replaceString = re.sub(r'"prefix":"[0-9]+"', pat, matchString)
7272
s=s.replace(matchedString,replaceString)
7373

7474
# masking bin
75-
matches = re.search(r'"bin":"((\s*[0-9]\s*)+)"', s)
75+
matches = re.search(r'"bin":"(((\s*[s/-]*\s*)+[0-9](\s*[s/-]*\s*)+)+)"', s)
7676
if matches:
7777
matchedString= matches.group(0)
7878
matchString= matchedString.replace(" ","")
79+
matchString= matchString.replace("-","")
7980
pats = re.findall(r'"bin":"[0-9]+"', matchString)
8081
if len(pats) > 0:
8182
pat = pats[0]
82-
pat.replace(" ", "")
8383
pat = re.sub(r'(?<=["])([0-9]{6})', r'x', pat)
8484
replaceString = re.sub(r'"bin":"[0-9]+"', pat, matchString)
8585
s=s.replace(matchedString,replaceString)

0 commit comments

Comments
 (0)
Please sign in to comment.