Skip to content

Commit 9b8a5a8

Browse files
committed
Update module to accept currency parameter
1 parent ba79b9d commit 9b8a5a8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

views/templates/front/payment.tpl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<p>
3636
-
3737
{if $currencies|@count > 1}
38-
{l s='We allow several currencies to be sent via MyMod Payment.' mod='prestapaystack'}
38+
{l s='We allow several currencies to be sent via MyMod Payment.' mod='prestapaystack'}
3939
<div class="form-group">
4040
<label>{l s='Choose one of the following:' mod='prestapaystack'}</label>
4141
<select id="currency_payment" class="form-control" name="currency_payment">
@@ -78,13 +78,14 @@
7878
<input class="btn btn-default pull-right" type="button" name="save_settings" id="paystack_button" value="Pay Now" />
7979

8080
{else}
81-
<script
81+
<script
8282
src="https://js.paystack.co/v1/inline.js"
8383
data-key="{$key}"
8484
data-email="{$email}"
8585
data-amount="{$total_amount*100}"
86+
data-currency="{$currency->iso_code}"
8687
data-ref="{$code}">
87-
</script>
88+
</script>
8889
{/if}
8990

9091
</form>
@@ -102,7 +103,7 @@
102103
key: '{$key}',
103104
email: '{$email}',
104105
amount: '{$total_amount*100}',
105-
currency: '{$cart_currency}',
106+
currency: '{$currency->iso_code}',
106107
ref: '{$code}',
107108
callback: function(response){
108109
$( "#paystack_form" ).submit();

0 commit comments

Comments
 (0)