We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 985a61f6 authored by Rik ter Beek's avatar Rik ter Beek Committed by GitHub

Merge pull request #150 from Adyen/develop-rik

#149 for non cards do not the CSE encryption
parents cdca6e60 7273f64d
......@@ -80,32 +80,35 @@ define(
event.preventDefault();
}
var cse_key = this.getCSEKey();
var options = { enableValidations: false};
var cseInstance = adyen.encrypt.createEncryption(cse_key, options);
var generationtime = self.getGenerationTime();
var cardData = {
cvc : self.creditCardVerificationNumber,
expiryMonth : self.creditCardExpMonth(),
expiryYear : self.creditCardExpYear(),
generationtime : generationtime
};
var encryptedData = cseInstance.encrypt(cardData);
// set payment method to adyen_hpp
var data = {
"method": self.method,
"po_number": null,
"additional_data": {
encrypted_data: encryptedData,
recurring_detail_reference: self.value,
variant: self.agreement_data.variant,
number_of_installments: self.installment
recurring_detail_reference: self.value
}
};
}
// only use CSE and installments for cards
if (self.agreement_data.card) {
var cse_key = this.getCSEKey();
var options = { enableValidations: false};
var cseInstance = adyen.encrypt.createEncryption(cse_key, options);
var generationtime = self.getGenerationTime();
var cardData = {
cvc : self.creditCardVerificationNumber,
expiryMonth : self.creditCardExpMonth(),
expiryYear : self.creditCardExpYear(),
generationtime : generationtime
};
var encryptedData = cseInstance.encrypt(cardData);
// set payment method to adyen_hpp
data.additional_data.encrypted_data = encryptedData;
data.additional_data.number_of_installments = self.installment;
}
if (this.validate() && additionalValidators.validate()) {
//this.isPlaceOrderActionAllowed(false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment