Skip to content

TranslatePinData

Source: src/AWS/PaymentCryptography/TranslatePinData.ts

Runtime binding for payment-cryptography:TranslatePinData — translates an encrypted PIN block from one PIN encryption Key (and ISO 9564 format) to another without the PIN ever leaving the service. This is the core acquirer operation for forwarding PIN blocks between networks. Provide TranslatePinDataHttp on the Function to satisfy this service.

// init
const translatePin = yield* PaymentCryptography.TranslatePinData(pek, partnerPek);
// runtime
const translated = yield* translatePin({
IncomingTranslationAttributes: {
IsoFormat0: { PrimaryAccountNumber: pan },
},
OutgoingTranslationAttributes: {
IsoFormat0: { PrimaryAccountNumber: pan },
},
EncryptedPinBlock: encryptedPinBlock,
});