Skip to content

Commit

Permalink
validate birthdate
Browse files Browse the repository at this point in the history
  • Loading branch information
diegobarrera committed May 10, 2018
1 parent 8a7c56c commit b0ad7b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gateway/payu.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ module.exports.sale = function(payload, credentials, type, cb) {
},
};
if (country === 'MX') {
body.payer.birthdate = payload.metadata.birthdate || '1990-05-25';
body.payer.birthdate = (payload.metadata && payload.metadata.birthdate) ? payload.metadata.birthdate : '1990-05-25';
}
if (payload.payment.cvc) {
body.transaction.creditCard = {
Expand Down

0 comments on commit b0ad7b0

Please sign in to comment.