Skip to content

Commit 016ee0a

Browse files
committed
Payment card expiry, stripe configuration
1 parent 36169a6 commit 016ee0a

File tree

6 files changed

+13
-2
lines changed

6 files changed

+13
-2
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ the gadael-documentation repository and build the site using hexo.
1010
## TODO
1111

1212
* [ ] Authenticate using linkedin
13-
* [ ] Created a landing page for open-source requests
1413
* [x] Captcha
1514
* [ ] unlink 3rd party accounts
1615
* [x] Get form values back if registration failed because of password requirements

themes/gadael/languages/en.yml

+1
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,4 @@ affiliation:
283283
button: 'Send'
284284
stripe:
285285
testaccount: 'This site is configured with a test account for payment, no transaction will be accounted. The test card number is: 4242424242424242'
286+
expirytext: 'The current saved payment card expire on:'

themes/gadael/languages/fr.yml

+1
Original file line numberDiff line numberDiff line change
@@ -284,3 +284,4 @@ affiliation:
284284
button: 'Envoyer'
285285
stripe:
286286
testaccount: 'Ce site est configuré avec un compte de test pour les paiements, aucune transaction ne sera comptabilisée. Le numéro de carte de test est : 4242424242424242'
287+
expirytext: 'La carte de paiement actuellement enregistrée expire le :'

themes/gadael/layout/account_creditcard.ejs

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
<%- partial('common/stripe') %>
1313

14+
<p ng-if="currentExpiry" class="info-bloc">
15+
<i class="fa fa-info-circle"></i>
16+
<%= __('stripe.expirytext') %> {{currentExpiry}}
17+
</p>
18+
1419

1520
<form>
1621
<p class="card-wrapper"></p>

themes/gadael/source/css/_partial/accountform.styl

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
float: left
2626
color:white
2727

28+
.info-bloc
29+
margin: 1.5em 0
30+
padding: 1em
31+
background: rgba(color-button-main, 0.20)
2832

2933

3034
h2,h3

themes/gadael/source/js/creditcard.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function($scope, $http) {
5151

5252
if (response.data.exp_month && response.data.exp_year) {
5353
currentExpiry = response.data.exp_month+'/'+response.data.exp_year;
54+
$scope.currentExpiry = currentExpiry;
5455
}
5556
}
5657

@@ -108,7 +109,7 @@ function($scope, $http) {
108109
$scope.creditcard.exp_year = parseInt(expiry[1], 10);
109110

110111

111-
Stripe.setPublishableKey('pk_test_NQQfxEp03QaFUUSuxSYISJC0');
112+
Stripe.setPublishableKey($scope.session.stripeKey);
112113
Stripe.card.createToken($scope.creditcard, stripeResponseHandler);
113114
};
114115

0 commit comments

Comments
 (0)