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: Change position of Paypal/Pay Now Button #5621

Merged
merged 1 commit into from
Nov 14, 2020
Merged
Changes from all commits
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
98 changes: 46 additions & 52 deletions app/templates/orders/pending.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,64 +20,58 @@
@data={{this.model.order}}
@event={{this.model.event}}
@eventCurrency={{this.model.order.event.paymentCurrency}} />
</div>
<div class="mobile hidden seven wide column">
<Orders::EventInfo
@data={{this.model.order}} />
</div>
</div>
<div class="row">
<div class="nine wide right aligned column">
{{#if this.isStripe}}
<StripeCheckout
@image="https://stripe.com/img/documentation/checkout/marketplace.png"
@currency={{this.model.order.event.paymentCurrency}}
@locale="auto"
@name="Open Event"
@class="ui right labeled icon blue button"
@description={{this.paymentDescription}}
@amount={{this.paymentAmount}}
@key={{this.model.order.event.stripeAuthorization.stripePublishableKey}}
@onToken={{action "processStripeToken"}}
@onClosed={{action "checkoutClosed"}}
@onOpened={{action "checkoutOpened"}}>
{{t 'Pay Now'}}
<i class="credit card icon"></i>
</StripeCheckout>
{{/if}}
{{#if this.isPaypal}}
<div class='paypal-button'>
<PaypalButton
@data={{this.model.order}}
@paymentFor="order" />
</div>
{{/if}}
{{#if this.isOmise}}
<div>
<form class="checkout-form" name="checkoutForm" method='POST' action={{this.omiseFormAction}}>
<script type="text/javascript" src="https://cdn.omise.co/omise.js" data-key="{{this.publicKeyOmise}}" data-amount="{{this.paymentAmount}}" data-currency="{{this.model.order.event.paymentCurrency}}" data-default-payment-method="credit_card">
</script>
</form>
</div>
{{/if}}
{{#if this.isPaytm}}
<button class="ui button primary" {{action "openPaytmModal"}}>{{t 'Pay with PayTM'}}</button>
{{/if}}
{{#if this.isAliPay}}
<button class="ui button primary"
{{action "alipayCheckout" this.model.order.identifier}}>{{t 'Pay with AliPay'}}</button>
{{/if}}
</div>
</div>

<div class="row">
<div class="nine wide column">
<br/>
<Forms::Orders::AttendeeList
@save="save"
@data={{this.model.order}}
@fields={{this.model.form}} />
</div>
<div class="seven wide column">
<Orders::EventInfo
@data={{this.model.order}} />
<br/>
<div>
{{#if this.isStripe}}
<StripeCheckout
@image="https://stripe.com/img/documentation/checkout/marketplace.png"
@currency={{this.model.order.event.paymentCurrency}}
@locale="auto"
@name="Open Event"
@class="ui right labeled icon blue button"
@description={{this.paymentDescription}}
@amount={{this.paymentAmount}}
@key={{this.model.order.event.stripeAuthorization.stripePublishableKey}}
@onToken={{action "processStripeToken"}}
@onClosed={{action "checkoutClosed"}}
@onOpened={{action "checkoutOpened"}}>
{{t 'Pay Now'}}
<i class="credit card icon"></i>
</StripeCheckout>
{{/if}}
{{#if this.isPaypal}}
<div class='paypal-button ui fluid button'>
<PaypalButton
@data={{this.model.order}}
@paymentFor="order" />
</div>
{{/if}}
{{#if this.isOmise}}
<div>
<form class="checkout-form" name="checkoutForm" method='POST' action={{this.omiseFormAction}}>
<script type="text/javascript" src="https://cdn.omise.co/omise.js" data-key="{{this.publicKeyOmise}}" data-amount="{{this.paymentAmount}}" data-currency="{{this.model.order.event.paymentCurrency}}" data-default-payment-method="credit_card">
</script>
</form>
</div>
{{/if}}
{{#if this.isPaytm}}
<button class="ui fluid button primary" {{action "openPaytmModal"}}>{{t 'Pay with PayTM'}}</button>
{{/if}}
{{#if this.isAliPay}}
<button class="ui fluid button primary"
{{action "alipayCheckout" this.model.order.identifier}}>{{t 'Pay with AliPay'}}</button>
{{/if}}
</div>
<br/>
<Orders::TicketHolder
@data={{this.model.order}} />
</div>
Expand Down