/AWS1/IF_PCD=>GENERATEAUTHREQUESTCRYPT()¶
About GenerateAuthRequestCryptogram¶
Generates an Authorization Request Cryptogram (ARQC) for an EMV chip payment card authorization. For more information, see Generate auth request cryptogram in the Amazon Web Services Payment Cryptography User Guide.
ARQC generation uses an Issuer Master Key (IMK) for application cryptograms (TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS) to derive a session key, which is then used to generate the cryptogram from the provided transaction data (when applicable). To use this operation, you must first create or import an IMK-AC key by calling CreateKey or ImportKey. The KeyModesOfUse should be set to DeriveKey for the IMK-AC encryption key.
This operation is intended for development and testing scenarios only. It is not recommended to use this operation as a substitute for card-based cryptogram generation in production payment flows.
For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide.
Cross-account use: This operation supports cross-account use when the key has a resource-based policy that grants access. For more information, see Resource-based policies.
Related operations:
Method Signature¶
METHODS /AWS1/IF_PCD~GENERATEAUTHREQUESTCRYPT
IMPORTING
!IV_KEYIDENTIFIER TYPE /AWS1/PCDKEYARNORKEYALIASTYPE OPTIONAL
!IV_TRANSACTIONDATA TYPE /AWS1/PCDTRANSACTIONDATATYPE OPTIONAL
!IV_MAJORKEYDERIVATIONMODE TYPE /AWS1/PCDMAJORKEYDERIVATIONMDE OPTIONAL
!IO_SESSIONKEYDERIVATIONATTRS TYPE REF TO /AWS1/CL_PCDSESSKEYDERIVATION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pcdgenauthreqcrptout
RAISING
/AWS1/CX_PCDACCESSDENIEDEX
/AWS1/CX_PCDINTERNALSERVEREX
/AWS1/CX_PCDRESOURCENOTFOUNDEX
/AWS1/CX_PCDTHROTTLINGEX
/AWS1/CX_PCDVALIDATIONEX
/AWS1/CX_PCDCLIENTEXC
/AWS1/CX_PCDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_keyidentifier TYPE /AWS1/PCDKEYARNORKEYALIASTYPE /AWS1/PCDKEYARNORKEYALIASTYPE¶
The
keyARNof the IMK-AC (TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS) that Amazon Web Services Payment Cryptography uses to generate the ARQC.
iv_transactiondata TYPE /AWS1/PCDTRANSACTIONDATATYPE /AWS1/PCDTRANSACTIONDATATYPE¶
The transaction data that Amazon Web Services Payment Cryptography uses for ARQC generation. The same transaction data is used for ARQC verification by the issuer using VerifyAuthRequestCryptogram.
iv_majorkeyderivationmode TYPE /AWS1/PCDMAJORKEYDERIVATIONMDE /AWS1/PCDMAJORKEYDERIVATIONMDE¶
The method to use when deriving the major encryption key for ARQC generation within Amazon Web Services Payment Cryptography.
io_sessionkeyderivationattrs TYPE REF TO /AWS1/CL_PCDSESSKEYDERIVATION /AWS1/CL_PCDSESSKEYDERIVATION¶
The attributes and values to use for deriving a session key for ARQC generation within Amazon Web Services Payment Cryptography.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_pcdgenauthreqcrptout /AWS1/CL_PCDGENAUTHREQCRPTOUT¶
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->generateauthrequestcrypt(
io_sessionkeyderivationattrs = new /aws1/cl_pcdsesskeyderivation(
io_amex = new /aws1/cl_pcdsessionkeyamex(
iv_pansequencenumber = |string|
iv_primaryaccountnumber = |string|
)
io_emv2000 = new /aws1/cl_pcdsessionkeyemv2000(
iv_applicationtransactcnter = |string|
iv_pansequencenumber = |string|
iv_primaryaccountnumber = |string|
)
io_emvcommon = new /aws1/cl_pcdsesskeyemvcommon(
iv_applicationtransactcnter = |string|
iv_pansequencenumber = |string|
iv_primaryaccountnumber = |string|
)
io_mastercard = new /aws1/cl_pcdsesskeymastercard(
iv_applicationtransactcnter = |string|
iv_pansequencenumber = |string|
iv_primaryaccountnumber = |string|
iv_unpredictablenumber = |string|
)
io_visa = new /aws1/cl_pcdsessionkeyvisa(
iv_pansequencenumber = |string|
iv_primaryaccountnumber = |string|
)
)
iv_keyidentifier = |string|
iv_majorkeyderivationmode = |string|
iv_transactiondata = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_keyarn = lo_result->get_keyarn( ).
lv_keycheckvalue = lo_result->get_keycheckvalue( ).
lv_authrequestcryptogramty = lo_result->get_authrequestcryptogram( ).
ENDIF.