Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed alipay workflow & naming #3465

Merged
merged 2 commits into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/components/forms/wizard/basic-details-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export default Component.extend(FormMixin, EventWizardMixin, {
return this.get('settings.isOmiseActivated') && find(paymentCurrencies, ['code', this.get('data.event.paymentCurrency')]).omise;
}),

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

tickets: computed('data.event.tickets.@each.isDeleted', 'data.event.tickets.@each.position', function() {
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/orders/pending.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default Controller.extend({
}),

actions: {
async aliPayCheckout(order_identifier) {
async alipayCheckout(order_identifier) {
try {
const res = await this.loader.load(`alipay/create_source/${order_identifier}`);
this.notify.success(this.l10n.t('Payment has succeeded'));
Expand Down
2 changes: 1 addition & 1 deletion app/models/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default ModelBase.extend(CustomPrimaryKeyMixin, {
canPayByCheque : attr('boolean', { defaultValue: false }),
canPayByBank : attr('boolean', { defaultValue: false }),
canPayByOmise : attr('boolean', { defaultValue: false }),
canPayByAliPay : attr('boolean', { defaultValue: false }),
canPayByAlipay : attr('boolean', { defaultValue: false }),
canPayOnsite : attr('boolean', { defaultValue: false }),
paymentCountry : attr('string'),
paymentCurrency : attr('string', { defaultValue: 'USD' }),
Expand Down
2 changes: 1 addition & 1 deletion app/models/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default ModelBase.extend({
stripeTestClientId : attr('string'),
stripeTestSecretKey : attr('string'),
stripeTestPublishableKey : attr('string'),
isAliPayActivated : attr('boolean'),
isAlipayActivated : attr('boolean'),
isPaypalActivated : attr('boolean'),
isStripeActivated : attr('boolean'),
isOmiseActivated : attr('boolean'),
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/forms/orders/order-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@
<label for="payment_mode"><img src="/images/payment-logos/omise.png" alt="omise"></label>
</div>
{{/if}}
{{#if data.event.canPayByAliPay}}
{{#if data.event.canPayByAlipay}}
<div class="field">
{{ui-radio name='payment_mode' label=(t 'AliPay') value='alipay' current=data.paymentMode
onChange=(action (mut data.paymentMode))}}
<label for="payment_mode"><img src="/images/payment-logos/alipay.png" alt="alipay"></label>
<label for="payment_mode"><img src="/images/payment-logos/alipay.png" alt="alipay" class="ui tiny image"></label>
</div>
{{/if}}
{{#if data.event.canPayByCheque}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
<label>{{t 'Payment with AliPay'}}</label>
<div class="field payments">
<div class="ui checkbox">
{{input type='checkbox' id='payment_by_alipay' checked=data.event.canPayByAliPay}}
{{input type='checkbox' id='payment_by_alipay' checked=data.event.canPayByAlipay}}
<label for="payment_by_alipay">
{{t 'Yes, accept payment through AliPay Gateway'}}
<div class="ui hidden divider"></div>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/orders/pending.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</div>
{{/if}}
{{#if isAliPay}}
<button class="ui button primary" {{action alipayCheckout model.order.identifier}}>{{t 'Pay with AliPay'}}</button>
<button class="ui button primary" {{action "alipayCheckout" model.order.identifier}}>{{t 'Pay with AliPay'}}</button>
{{/if}}
</div>
</div>
Expand Down