Skip to content

Commit

Permalink
Fixed expiration date in cc template
Browse files Browse the repository at this point in the history
  • Loading branch information
ugol committed Jan 14, 2025
1 parent af2bd2b commit aae7a06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/payment_credit_card.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ $cardId := itoa (counter "cardId" 1 1)}}{{add_v_to_list "cardId" $cardId }}{{ $cardNumber := card (randoms "visa|mastercard|amex|discover") }}{{add_v_to_list "cardNumber" $cardNumber }}{{ $cardCVV := cardCVV 3 }}{{ add_v_to_list "cardCVV" $cardCVV }}
{{ $cardExpire := (print (regex "^0[1-9]|1[012]$" ) "/" (integer 22 30) )}}{{ add_v_to_list "cardExpire" $cardExpire }}{{ $cardExpire := (print (regex "^0[1-9]|1[012]$" ) "/" (integer 22 30) )}}{{ add_v_to_list "cardExpire" $cardExpire }}{
{{ $cardExpire := (print (regex "^0[1-9]|1[012]$" ) "/" (integer 22 30) )}}{{ add_v_to_list "cardExpire" $cardExpire }}{{ $cardExpire := (print (regex "^0[1-9]|1[012]$" ) "/" (integer 26 30) )}}{{ add_v_to_list "cardExpire" $cardExpire }}{
"card_id": {{$cardId}},
"card_number": "{{$cardNumber}}",
"cvv": "{{$cardCVV}}",
"expiration_date": "{{$cardExpire}}"
}
}

1 comment on commit aae7a06

@hifly81
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tks

Please sign in to comment.