Skip to content

Commit 11f0ded

Browse files
shreyanshdwivedimrsaicharan1
authored andcommitted
feat: add paytm to create event and order-form page (#3400)
1 parent e568a3b commit 11f0ded

File tree

6 files changed

+28
-0
lines changed

6 files changed

+28
-0
lines changed

app/components/forms/wizard/basic-details-step.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export default Component.extend(FormMixin, EventWizardMixin, {
4040
return this.get('settings.isPaypalActivated') && find(paymentCurrencies, ['code', this.get('data.event.paymentCurrency')]).paypal;
4141
}),
4242

43+
canAcceptPaytm: computed('data.event.paymentCurrency', 'settings.isPaytmActivated', function() {
44+
return this.get('settings.isPaytmActivated') && find(paymentCurrencies, ['code', this.get('data.event.paymentCurrency')]).paytm;
45+
}),
46+
4347
canAcceptStripe: computed('data.event.paymentCurrency', 'settings.isStripeActivated', function() {
4448
return this.get('settings.isStripeActivated') && find(paymentCurrencies, ['code', this.get('data.event.paymentCurrency')]).stripe;
4549
}),

app/controllers/orders/pending.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export default Controller.extend({
1616
return this.get('model.order.paymentMode') === 'paypal';
1717
}),
1818

19+
isPaytm: computed('model.order.paymentMode', function() {
20+
return this.get('model.order.paymentMode') === 'paytm';
21+
}),
22+
1923
isOmise: computed('model.order.paymentMode', function() {
2024
return this.get('model.order.paymentMode') === 'omise';
2125
}),

app/models/event.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export default ModelBase.extend(CustomPrimaryKeyMixin, {
5454

5555
isTaxEnabled : attr('boolean', { defaultValue: false }),
5656
canPayByPaypal : attr('boolean', { defaultValue: false }),
57+
canPayByPaytm : attr('boolean', { defaultValue: false }),
5758
canPayByStripe : attr('boolean', { defaultValue: false }),
5859
isStripeLinked : attr('boolean'),
5960
canPayByCheque : attr('boolean', { defaultValue: false }),

app/templates/components/forms/orders/order-form.hbs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@
150150
<label for="payment_mode"><img src="/images/payment-logos/paypal.png" alt="paypal"></label>
151151
</div>
152152
{{/if}}
153+
{{#if data.event.canPayByPaytm}}
154+
<div class="field">
155+
{{ui-radio name='payment_mode' label=(t 'Paytm') value='paytm' current=data.paymentMode
156+
onChange=(action (mut data.paymentMode))}}
157+
<label for="payment_mode"><img src="/images/payment-logos/paytm.png" alt="paytm"></label>
158+
</div>
159+
{{/if}}
153160
{{#if data.event.canPayByOmise}}
154161
<div class="field">
155162
{{ui-radio name='payment_mode' label=(t 'Omise') value='omise' current=data.paymentMode

app/templates/components/forms/wizard/basic-details-step.hbs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,18 @@
329329
</div>
330330
{{/if}}
331331
{{/if}}
332+
{{#if canAcceptPaytm}}
333+
<label>{{t 'Payment by Paytm'}}</label>
334+
<div class="field payments">
335+
<div class="ui checkbox">
336+
{{input type='checkbox' id='payment_by_paytm' checked=data.event.canPayByPaytm}}
337+
<label for="payment_by_paytm">
338+
<span>{{t 'YES, accept payment through Paytm'}}</span>
339+
<br>
340+
</label>
341+
</div>
342+
</div>
343+
{{/if}}
332344
{{#if canAcceptAliPay}}
333345
<label>{{t 'Payment with AliPay'}}</label>
334346
<div class="field payments">

public/images/payment-logos/paytm.png

3.63 KB
Loading

0 commit comments

Comments
 (0)