Skip to content

Commit f87d084

Browse files
mrsaicharan1kushthedude
authored andcommitted
fix: Fixed alipay workflow (#3465)
1 parent 56f93b0 commit f87d084

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export default Component.extend(FormMixin, EventWizardMixin, {
5252
return this.get('settings.isOmiseActivated') && find(paymentCurrencies, ['code', this.get('data.event.paymentCurrency')]).omise;
5353
}),
5454

55-
canAcceptAliPay: computed('data.event.paymentCurrency', 'settings.isAliPayActivated', function() {
56-
return this.get('settings.isAliPayActivated') && find(paymentCurrencies, ['code', this.get('data.event.paymentCurrency')]).alipay;
55+
canAcceptAliPay: computed('data.event.paymentCurrency', 'settings.isAlipayActivated', function() {
56+
return this.get('settings.isAlipayActivated') && find(paymentCurrencies, ['code', this.get('data.event.paymentCurrency')]).alipay;
5757
}),
5858

5959
tickets: computed('[email protected]', '[email protected]', function() {

app/controllers/orders/pending.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default Controller.extend({
4242
}),
4343

4444
actions: {
45-
async aliPayCheckout(order_identifier) {
45+
async alipayCheckout(order_identifier) {
4646
try {
4747
const res = await this.loader.load(`alipay/create_source/${order_identifier}`);
4848
this.notify.success(this.l10n.t('Payment has succeeded'));

app/models/event.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default ModelBase.extend(CustomPrimaryKeyMixin, {
6060
canPayByCheque : attr('boolean', { defaultValue: false }),
6161
canPayByBank : attr('boolean', { defaultValue: false }),
6262
canPayByOmise : attr('boolean', { defaultValue: false }),
63-
canPayByAliPay : attr('boolean', { defaultValue: false }),
63+
canPayByAlipay : attr('boolean', { defaultValue: false }),
6464
canPayOnsite : attr('boolean', { defaultValue: false }),
6565
paymentCountry : attr('string'),
6666
paymentCurrency : attr('string', { defaultValue: 'USD' }),

app/models/setting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default ModelBase.extend({
5353
stripeTestClientId : attr('string'),
5454
stripeTestSecretKey : attr('string'),
5555
stripeTestPublishableKey : attr('string'),
56-
isAliPayActivated : attr('boolean'),
56+
isAlipayActivated : attr('boolean'),
5757
isPaypalActivated : attr('boolean'),
5858
isStripeActivated : attr('boolean'),
5959
isOmiseActivated : attr('boolean'),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@
164164
<label for="payment_mode"><img src="/images/payment-logos/omise.png" alt="omise"></label>
165165
</div>
166166
{{/if}}
167-
{{#if data.event.canPayByAliPay}}
167+
{{#if data.event.canPayByAlipay}}
168168
<div class="field">
169169
{{ui-radio name='payment_mode' label=(t 'AliPay') value='alipay' current=data.paymentMode
170170
onChange=(action (mut data.paymentMode))}}
171-
<label for="payment_mode"><img src="/images/payment-logos/alipay.png" alt="alipay"></label>
171+
<label for="payment_mode"><img src="/images/payment-logos/alipay.png" alt="alipay" class="ui tiny image"></label>
172172
</div>
173173
{{/if}}
174174
{{#if data.event.canPayByCheque}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@
345345
<label>{{t 'Payment with AliPay'}}</label>
346346
<div class="field payments">
347347
<div class="ui checkbox">
348-
{{input type='checkbox' id='payment_by_alipay' checked=data.event.canPayByAliPay}}
348+
{{input type='checkbox' id='payment_by_alipay' checked=data.event.canPayByAlipay}}
349349
<label for="payment_by_alipay">
350350
{{t 'Yes, accept payment through AliPay Gateway'}}
351351
<div class="ui hidden divider"></div>

app/templates/orders/pending.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<button class="ui button primary" {{action "openPaytmModal"}}>{{t 'Pay with PayTM'}}</button>
6666
{{/if}}
6767
{{#if isAliPay}}
68-
<button class="ui button primary" {{action alipayCheckout model.order.identifier}}>{{t 'Pay with AliPay'}}</button>
68+
<button class="ui button primary" {{action "alipayCheckout" model.order.identifier}}>{{t 'Pay with AliPay'}}</button>
6969
{{/if}}
7070
</div>
7171
</div>

0 commit comments

Comments
 (0)