Skip to content

Commit

Permalink
fix: Change position of Paypal/Pay Now Button (#5621)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeghalBisht authored Nov 14, 2020
1 parent 5ae084a commit 5979194
Showing 1 changed file with 46 additions and 52 deletions.
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

1 comment on commit 5979194

@vercel
Copy link

@vercel vercel bot commented on 5979194 Nov 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.