問題タブ [mastercard]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - MPGS 統合 CREATE_CHECKOUT_SESSION cURL
MPGS を構成しようとしており、コールバック URL をセットアップしようとしています。REST を使用してセッションを作成する必要があります。
コードは次のようなものです。コードを cURL でどのように記述すべきかわかりません。誰か助けてくれませんか
ありがとう
java - Selenium for Java を使用して「https://stage.masterpassteststore.com/configuration」の設定を自動化するには?
Selenium for Java を使用して、2 つの要素の設定を自動化しようとしています -Merchant integration version (v5/v6)
とhttps://stage.masterpassteststore.com/configurationページ。Merchant Checkout ID (Sandbox-V7-STD-9CCBB)
環境の設定は既に解決しました(Sandbox/Production)
が、それ以上はありません。
より賢い人々からの助けを歓迎します。:)
「Dmitri T」からの唯一の提案は、以下のエラーで終わります。
ポート 37781 で ChromeDriver 75.0.3770.140 (2d9f97485c7b07dc18a74666574f19176731995c-refs/branch-heads/3770@{#1155}) を起動すると、ローカル接続のみが許可されます。悪意のあるコードによるアクセスを防ぐために、ChromeDriver および関連するテスト フレームワークで使用されるポートを保護してください。Srp 23、2019 12:57:04 ODP。org.openqa.selenium.remote.ProtocolHandshake createSession INFO: 検出された方言: W3C 環境が正常に選択されました: スレッド「メイン」でサンドボックス例外が発生しました、464)。他の要素はクリックを受け取ります: ... (セッション情報: chrome=75.0.3770.80) ビルド情報: バージョン: '3.9.1'、リビジョン: '63f7b50'、時間: '2018-02-07T22:42:22.379Z ' システム情報: ホスト: '*'、ip: '10.45.1.194'、os.name: 'Windows 7'、os.arch: 'amd64'、os.version: '6.1'、java.version: '1.8.0_221' ドライバー情報: org. openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 75.0.3770.80, chrome: {chromedriverVersion: 75.0.3770.140 (2d9f97485c7b..., userDataDir: C:\Users*)\AppDat...}, goog:chromeOptions: {debuggerAddress: localhost:55213}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy: Proxy(), setWindowRect: true, strictFileInteractability : false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: disconnect and notify} セッション ID: 903a3ae8fe6f8d9e7260742bb2ffa419 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance( NativeConstructorAccessorImpl.java:62) で sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) で java.lang.reflect.Constructor.newInstance(Constructor.java:423) で org.openqa.selenium.remote.http.W3CHttpResponseCodec .createException(W3CHttpResponseCodec.java:187) 組織で。openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49) at org.openqa.selenium.remote.HttpCommandExecutor. org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) で実行 (HttpCommandExecutor.java:160) org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) で org .openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:279) で org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:83) で App.main(App.java:36)org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) で実行 (HttpCommandExecutor.java:160) org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) で org .openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:279) で org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:83) で App.main(App.java:36)org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) で実行 (HttpCommandExecutor.java:160) org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) で org .openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:279) で org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:83) で App.main(App.java:36)
cryptography - MasterCard PIN 変更発行者スクリプトが失敗し、Thales HSM が MAC 生成に使用されます。EMV
Thales Payshield 9000 HSM を使用しています。これまでのところ、すべてのコマンドが機能し、私が望んでいたことがすべて達成されました。
問題は、ATM でピンを変更しようとしたときです。MasterCardのドキュメントを確認すると、ピン変更スクリプトが生成され、フォーマットはOKのようです。
PIN 変更スクリプトは次のようになります。86158424000210PPPPPPPPPPPPPPPPMMMMMMMMMMMMMMMM
ここで、16 個の P 文字は DE125 で送信される PIN ブロックであり、16 個の M 文字は MAC を表します。(私はそれらをマスクしましたが、以下は例のデータを使用します)
このスクリプトを使用すると、私の側からはすべて問題ないように見えます。今、問題はMAC生成だと思います。
MAC を生成するには、次の HSM コマンドを使用します。
- HA (TAK を生成します (ランダムなキーです。このコマンドを呼び出すたびに (PIN 変更操作ごとに)、キーは異なります)) - 入力は
key = PVK key (U+32Hex symbols under LMK)
,delimiter = ';'
,keySchemeTmk = 'U'
,keySchemeLmk = 'U'
です。次に、TAKキーを受け取ります - M6 (MAC の生成) - 入力:
modeFlag = 0
,inputFormatFlag = 2
,macSize = 1
,macAlgorithm = 3
,paddingMethod = 0
,keyType = '003'
,key = 'Tak key from HA command'
, (メッセージは上のスクリーンショットのように連結されます: コマンド ヘッダー + ApplicationtransactionCounter + ARQC + PIN ブロック) (メッセージ データはスクリーンショットの例からのものですmessagelength = '0030'
)message = '8424000210345755BFDC4F2903A392B3E1229A502C892680'
したがって、これらの 2 つのコマンドが実行されると、正確に必要な 16HEX シンボル MAC を受け取ります。したがって、スクリプトは次のように準備されます: 8424000210 B3E1229A502C8926 422A8FF11056ACD4
: header => 8424000210
、pinBlock => B3E1229A502C8926
およびMAC => 422A8FF11056ACD4
ATM に行って PIN を変更すると、PIN が変更されず、取り消しメッセージが表示されます。
また、誰でもこれらのフラグが何であるかを説明できますが、どのフラグを使用すればよいかわかりません (コマンド M6):
質問は次のとおりです。
- HSM コマンド M6 は、PIN 変更/ブロック解除スクリプト用の MAC を生成する正しいコマンドですか? MasterCardのドキュメントにはSMIキーで行う必要があると明確に記載されていますが、TAKキーが必要です。
- MAC ハッシュを取得しようとすると、M6 コマンドの構成が正しくありませんか?
更新しました
なんとか KU コマンドが機能し、応答が返ってきましたが、PIN の変更自体は正常に完了していません。以下に、KU コマンドに対して生成する要求を示します。
{
"mode_flag": "3",
"scheme_id": "1",
"mk_smi": "U25A22A6553A7F68ABACBD1E04BBD8889",
"pan": "7891234567891200",
"integrity_session_data": "55BFDC4F2903A392",
"plaintext_message_data_length": "0018",
"plaintext_message": "8424000210345755BFDC4F2903A392B3E1229A502C892680",
"delimiter": ";",
"confidentiality_session_data": "55BFDC4F2903A392",
"offset": "000F",
"cipher_text_message_data_length": "0008",
"cipher_text_message_data": "B3E1229A502C8926",
"delimiter2": ";",
"source_pin_encryption_key_type": "0",
"source_pin_encryption_key": "UBAAAA3488AA6AA564AAC8AA3AAC1AAA2",
"source_pin_block_format_code": "01",
"destination_pin_block_format_code": "35",
"pan2": "891234567891"
}
キーと機密データはマスクされるため、ここでは PAN が使用されます:5678912345678912
と シーケンス番号000
. 最初のpan
パラメータには、最後の PAN 14 桁 + シーケンス番号の最後の 2 桁が使用されます。パラメータにはpan2
、最後の 12 桁の PAN のみが使用され、チェック ディジットは除外されます。
プレーンテキスト データの PIN ブロックを新しい暗号化ピン ブロックに置き換えるために、正しいオフセット フラグを使用していますか?