Des modules ajoutés et mise en page du CSS
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,38 @@
|
||||
{render_form_field field="locale"}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{intl l="Global informations of this planified payment" d="paypal.bo.default"}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{render_form_field field="title"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{render_form_field field="description"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{render_form_field field="frequency_interval"}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{render_form_field field="frequency"}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{render_form_field field="cycle"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{render_form_field field="min_amount"}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{render_form_field field="max_amount"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<script>
|
||||
$('.paypal-log').on('click', function(){
|
||||
var details = $($(this).data('details'));
|
||||
|
||||
if (details.hasClass('hidden')) {
|
||||
details.removeClass('hidden');
|
||||
} else {
|
||||
details.addClass('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,20 @@
|
||||
<tr{if $log->getHook()} style="cursor: pointer;"{/if}>
|
||||
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td class="paypal-log" data-details="#details-{$log->getId()}">
|
||||
{if $log->getHook()}
|
||||
{$log->getHook()} ({intl l="See webhook details" d="paypal.bo.default"})
|
||||
<div id="details-{$log->getId()}" class="hidden">
|
||||
{$log->getMessage() nofilter}
|
||||
</div>
|
||||
{else}
|
||||
{$log->getMessage() nofilter}
|
||||
{/if}
|
||||
</td>
|
||||
<td><a title="{intl l='Edit this customer'}" href="{url path='/admin/customer/update' customer_id=$log->getCustomerId()}">{$log->getCustomerId()}</a></td>
|
||||
<td><a href="{url path="/admin/order/update/%id" id=$log->getOrderId()}">{$log->getOrderId()}</a></td>
|
||||
<td>
|
||||
<strong>{$log->getHook()}</strong>
|
||||
</td>
|
||||
<td>{intl l="critical_{$log->getLevel()}" d="paypal.bo.default"}</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,6 @@
|
||||
<!-- Tab menu -->
|
||||
<ul id="tabbed-menu" class="nav nav-tabs">
|
||||
<li {if $selectedMenu eq 'general'}class="active"{/if}><a href="{if $selectedMenu eq 'general'}#{else}{url path='/admin/module/paypal'}{/if}">{intl l="General configuration" d='paypal.bo.default'}</a></li>
|
||||
<li {if $selectedMenu eq 'planifiedPayment'}class="active"{/if}><a href="{if $selectedMenu eq 'planifiedPayment'}#{else}{url path='/admin/module/paypal/configure/planified'}{/if}">{intl l='Planified payment' d="paypal.bo.default"}</a></li>
|
||||
<li {if $selectedMenu eq 'log'}class="active"{/if}><a href="{if $selectedMenu eq 'log'}#{else}{url path='/admin/module/paypal/configure/log'}{/if}">{intl l='Log' d="paypal.bo.default"}</a></li>
|
||||
</ul>
|
||||
@@ -0,0 +1,236 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
{include file="paypal/menu/menu.html" selectedMenu="general"}
|
||||
|
||||
<div class="tab-content">
|
||||
<!-- Countries managing tab -->
|
||||
<div class="tab-pane active form-container">
|
||||
|
||||
{form name="paypal_form_configure"}
|
||||
|
||||
{if $form_error}
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
{elseif $general_error}
|
||||
<div class="alert alert-danger">
|
||||
{$general_error}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form action="{url path="/admin/module/paypal/configure"}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{include file = "includes/inner-form-toolbar.html"
|
||||
hide_flags = true
|
||||
page_url = "{url path='/admin/module/Paypal'}"
|
||||
close_url = "{url path='/admin/modules'}"
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-8">
|
||||
<h3>
|
||||
<span class="label label-primary">1</span>
|
||||
{intl l="SandBox configuration" d="paypal.bo.default"}
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="tips__img">
|
||||
<img src="{image file='assets/paypal_conf1.png' source="PayPal"}" alt="Payment configuration" class="img-responsive" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
{custom_render_form_field form=$form field="sandbox"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="sandbox"} {if $sandbox}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
{render_form_field form=$form field="sandbox_login" value=$sandbox_login}
|
||||
{render_form_field form=$form field="sandbox_password" value=$sandbox_password}
|
||||
{render_form_field form=$form field="sandbox_merchant_id" value=$sandbox_merchant_id}
|
||||
|
||||
{render_form_field form=$form field="allowed_ip_list" value=$allowed_ip_list}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 alert alert-info">
|
||||
<h4 class="text-uppercase">
|
||||
<span class="glyphicon glyphicon-info-sign"></span> {intl l="Help" d="paypal.bo.default"} : {intl l="Configuration" d="paypal.bo.default"}
|
||||
</h4>
|
||||
- {intl l="Log In on <a target='_blank' href='https://developer.paypal.com'>developer.paypal.com</a>" d="paypal.bo.default"}<br />
|
||||
- {intl l="Create REST API apps <a target='_blank' href='https://developer.paypal.com/developer/applications/'>here</a>" d="paypal.bo.default"}<br />
|
||||
- {intl l="Click on Create App" d="paypal.bo.default"}<br />
|
||||
- {intl l="Fill the fields : App Name & Sandbox developer account" d="paypal.bo.default"}<br />
|
||||
- {intl l="Click on Create App" d="paypal.bo.default"}<br />
|
||||
- {intl l="Copy & Paste the Client ID in the form below" d="paypal.bo.default"}<br />
|
||||
- {intl l="Copy & Paste the Client SECRET in the form below" d="paypal.bo.default"}<br />
|
||||
- <strong>{intl l="In SANDBOX WEBHOOKS" d="paypal.bo.default"} :</strong><br />
|
||||
- {intl l="Add Webhook" d="paypal.bo.default"}<br />
|
||||
- {url path="/module/paypal/webhook/all/events"}<br />
|
||||
- {intl l="Check 'All events'" d="paypal.bo.default"}<br />
|
||||
- <strong>{intl l="In SANDBOX APP SETTINGS" d="paypal.bo.default"} :</strong><br />
|
||||
- {intl l="Return URL" d="paypal.bo.default"}<br />
|
||||
- {navigate to="index"}<br />
|
||||
- {url path="/module/paypal/login/ok"}<br />
|
||||
- {url path="/module/paypal/agreement/ok"}<br />
|
||||
- {url path="/module/paypal/agreement/ko"}<br />
|
||||
- <label class="alert alert-danger">{intl l="This urls can take 3 hours to be taken in consideration" d="paypal.bo.default"}</label><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Accept payments" d="paypal.bo.default"} </strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Future Payments" d="paypal.bo.default"}</strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Billing agreements" d="paypal.bo.default"}</strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Invoicing" d="paypal.bo.default"} </strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Payouts" d="paypal.bo.default"} </strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="PayPal Here" d="paypal.bo.default"} </strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Log In with PayPal" d="paypal.bo.default"} </strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Personal Information" d="paypal.bo.default"}</strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Address Information" d="paypal.bo.default"}</strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Account Information" d="paypal.bo.default"}</strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Use Seamless Checkout" d="paypal.bo.default"}</strong><br />
|
||||
- {intl l="Check" d="paypal.bo.default"} <strong>{intl l="Allow the customers who haven't yet confirmed their email address with PayPal, to log in to your app" d="paypal.bo.default"}</strong><br />
|
||||
- <strong>{intl l="That's it !" d="paypal.bo.default"}</strong><br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-8">
|
||||
<h3>
|
||||
<span class="label label-primary">2</span>
|
||||
{intl l="Production configuration" d="paypal.bo.default"}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="tips__img">
|
||||
<img src="{image file='assets/paypal_conf2.png' source="PayPal"}" alt="Payment configuration" class="img-responsive" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{render_form_field form=$form field="login" value=$login}
|
||||
{render_form_field form=$form field="password" value=$password}
|
||||
{render_form_field form=$form field="merchant_id" value=$merchant_id}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 alert alert-info">
|
||||
<h4 class="text-uppercase">
|
||||
<span class="glyphicon glyphicon-info-sign"></span> {intl l="Help" d="paypal.bo.default"} : {intl l="Configuration" d="paypal.bo.default"}
|
||||
</h4>
|
||||
- {intl l="In your PayPal page API configuration" d="paypal.bo.default"}<br />
|
||||
- {intl l="Click on the Live Button" d="paypal.bo.default"}<br />
|
||||
<img src="{image file='assets/paypal_live_button.png' source="PayPal"}" alt="Payment configuration" class="img-responsive" /><br />
|
||||
- {intl l="And configure it like the SandBox" d="paypal.bo.default"}<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h3>
|
||||
<span class="label label-primary">3</span>
|
||||
{intl l="Payment configuration" d="paypal.bo.default"}
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="tips__img">
|
||||
<img src="{image file='assets/paypal_conf3.png' source="PayPal"}" alt="Payment configuration" class="img-responsive" />
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
{custom_render_form_field form=$form field="method_paypal"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="method_paypal"} {if $method_paypal}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
{custom_render_form_field form=$form field="method_paypal_with_in_context"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="method_paypal_with_in_context"} {if $method_paypal_with_in_context}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
{custom_render_form_field form=$form field="method_express_checkout"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="method_express_checkout"} {if $method_express_checkout}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
{custom_render_form_field form=$form field="method_credit_card"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="method_credit_card"} {if $method_credit_card}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
<div class="well well-sm alert-danger">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
{intl d='paypal.bo.default' l='This method works only with PayPal PRO UK account. Please contact PayPal to upgrade your account if you need this service. For more informations, go <a target="_blank" href="https://developer.paypal.com/docs/integration/direct/payments/accept-credit-cards/">here</a>'}
|
||||
</div>
|
||||
|
||||
{custom_render_form_field form=$form field="method_planified_payment"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="method_planified_payment"} {if $method_planified_payment}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
<div class="well well-sm alert-danger">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
<strong>{intl d='paypal.bo.default' l='This method use PayPal webhooks and works only in HTTPS !'}</strong>
|
||||
</div>
|
||||
|
||||
<div class="well well-sm">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
{intl d='paypal.bo.default' l='You can add some planified payment <a href="%url">here</a>.' url={url path="/admin/module/paypal/configure/planified"}}
|
||||
</div>
|
||||
|
||||
{custom_render_form_field form=$form field="send_confirmation_message_only_if_paid"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="send_confirmation_message_only_if_paid"} {if $send_confirmation_message_only_if_paid}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
{custom_render_form_field form=$form field="send_payment_confirmation_message"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="send_payment_confirmation_message"} {if $send_payment_confirmation_message}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
{custom_render_form_field form=$form field="send_recursive_message"}
|
||||
<input type="checkbox" {form_field_attributes form=$form field="send_recursive_message"} {if $send_recursive_message}checked{/if}>
|
||||
{$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
<div class="well well-sm">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
{intl d='paypal.bo.default' l='You can <a href="%url">edit the payment confirmation email</a> sent to the customer after a successful payment.' url={url path="/admin/configuration/messages"}}
|
||||
</div>
|
||||
|
||||
{custom_render_form_field form=$form field="minimum_amount"}
|
||||
<div class="input-group">
|
||||
<input type="text" {form_field_attributes form=$form field="minimum_amount" value=$minimum_amount}>
|
||||
<span class="input-group-addon">{currency attr='symbol'}</span>
|
||||
</div>
|
||||
{/custom_render_form_field}
|
||||
|
||||
{custom_render_form_field form=$form field="maximum_amount"}
|
||||
<div class="input-group">
|
||||
<input type="text" {form_field_attributes form=$form field="maximum_amount" value=$maximum_amount}>
|
||||
<span class="input-group-addon">{currency attr='symbol'}</span>
|
||||
</div>
|
||||
{/custom_render_form_field}
|
||||
|
||||
{render_form_field form=$form field="cart_item_count" value=$cart_item_count}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{include file = "includes/inner-form-toolbar.html"
|
||||
hide_flags = true
|
||||
page_url = "{url path='/admin/module/Paypal'}"
|
||||
close_url = "{url path='/admin/modules'}"
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
{include file = "paypal/includes/paypal-log-row-js.html"}
|
||||
@@ -0,0 +1,18 @@
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='Date' d="paypal.bo.default"}</th>
|
||||
<th>{intl l='Details' d="paypal.bo.default"}</th>
|
||||
<th>{intl l="Customer ID" d="paypal.bo.default"}</th>
|
||||
<th>{intl l="Order ID" d="paypal.bo.default"}</th>
|
||||
<th>{intl l="Webhook" d="paypal.bo.default"}</th>
|
||||
<th>{intl l="Level" d="paypal.bo.default"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="paypal_log" type="paypal_log" backend_context=true order_id=$order_id order="date-reverse"}
|
||||
{include file = "paypal/includes/paypal-log-row.html"}
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,105 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="clearfix">
|
||||
<ul class="breadcrumb pull-left">
|
||||
<li>
|
||||
<a href="{url path='/admin/home'}">{intl l="Home"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url path='/admin/modules'}">{intl l="Modules"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url path='/admin/module/PayPal'}">{intl l="PayPal"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url path='/admin/module/paypal/configure/log'}">{intl l="Automatic PayPal logs" d="paypal.bo.default"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
{include file="paypal/menu/menu.html" selectedMenu="log"}
|
||||
|
||||
<div class="tab-content">
|
||||
<!-- Countries managing tab -->
|
||||
<div class="tab-pane active form-container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
|
||||
<h3>
|
||||
<span class="label label-primary">1</span>
|
||||
{intl l="Automatic PayPal logs" d="paypal.bo.default"}
|
||||
</h3>
|
||||
|
||||
<div class="col-md-12 alert alert-info">
|
||||
<div class="col-md-8">
|
||||
<h4 class="text-uppercase">
|
||||
<span class="glyphicon glyphicon-info-sign"></span> {intl l="Help" d="paypal.bo.default"} :
|
||||
</h4>
|
||||
<div class="tips">
|
||||
{intl l="This is where we log all the transactions made with PayPal. PayPal webhooks also automatically feed these logs." d="paypal.bo.default"}
|
||||
<br />{intl l="This informations can be found directly in concerned order details." d="paypal.bo.default"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="tips__img">
|
||||
<img src="{image file='assets/paypal_webhook.png' source="PayPal"}" alt="Payment configuration" class="img-responsive" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{$page = $smarty.get.page|default:1}
|
||||
{$limit = $smarty.get.limit|default:100}
|
||||
|
||||
<div class="form-container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='Date' d="paypal.bo.default"}</th>
|
||||
<th>{intl l='Details' d="paypal.bo.default"}</th>
|
||||
<th>{intl l="Customer ID" d="paypal.bo.default"}</th>
|
||||
<th>{intl l="Order ID" d="paypal.bo.default"}</th>
|
||||
<th>{intl l="Webhook" d="paypal.bo.default"}</th>
|
||||
<th>{intl l="Level" d="paypal.bo.default"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="paypal_log" type="paypal_log" backend_context=true order="date-reverse" page=$page limit=$limit}
|
||||
{include file = "paypal/includes/paypal-log-row.html"}
|
||||
{/loop}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="100">
|
||||
{include
|
||||
file = "includes/pagination.html"
|
||||
loop_ref = "paypal_log"
|
||||
max_page_count = $limit
|
||||
page_url = {url path="/admin/module/paypal/configure/log"}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{include file = "paypal/includes/paypal-log-row-js.html"}
|
||||
{/block}
|
||||
@@ -0,0 +1,86 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="no-return-functions"}
|
||||
{$admin_current_location = 'module'}
|
||||
{/block}
|
||||
|
||||
{block name="page-title"}{intl l='Edit planified payment' d="paypal.bo.default"}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="planified-payment edit-planified-payment">
|
||||
<div id="wrapper" class="container">
|
||||
{loop name="paypal_planified_payment" type="paypal_planified_payment" id=$planifiedPaymentId backend_context=true}
|
||||
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='/admin/module/paypal/configure/planified'}">{intl l='Planified payments' d='paypal.bo.default'}</a></li>
|
||||
<li>{intl l='Editing planified payment "%title"' d="paypal.bo.default" title=$planifiedPayment->getTitle()}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7 title">
|
||||
{intl l='Edit planified payment %title' d="paypal.bo.default" title=$planifiedPayment->getTitle()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||
<li class="active">
|
||||
<a href="#general" data-toggle="tab">{intl l="General description" d="paypal.bo.default"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade active in" id="general">
|
||||
|
||||
<div class="form-container">
|
||||
|
||||
{form name="paypal_planified_payment_update_form"}
|
||||
<form method="POST" action="{url path="/admin/module/paypal/configure/planified/%id" id=$planifiedPayment->getId()}" {form_enctype} class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" hide_flags=true close_url={url path="/admin/module/paypal/configure/planified"}}
|
||||
|
||||
<input type="hidden" name="current_tab" value="general"/>
|
||||
|
||||
{* Be sure to get the planified payment ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="planifiedPaymentId" value="{$planifiedPayment->getId()}" />
|
||||
|
||||
{form_hidden_fields}
|
||||
|
||||
{render_form_field field="id"}
|
||||
|
||||
{render_form_field field="success_url" value={url path="/admin/module/paypal/configure/planified"}}
|
||||
|
||||
{if $form_error}
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
{include file = "paypal/form/create-or-update-planified-payment-form.html"}
|
||||
</div>
|
||||
|
||||
{include
|
||||
file="includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
hide_flags = true
|
||||
|
||||
close_url={url path="/admin/module/paypal/configure/planified"}
|
||||
}
|
||||
|
||||
<small>{intl l='Planified payment created on %date_create. Last modification: %date_change' d="paypal.bo.default" date_create={format_date date=$CREATE_DATE} date_change={format_date date=$UPDATE_DATE} }</small>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,185 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="clearfix">
|
||||
<ul class="breadcrumb pull-left">
|
||||
<li>
|
||||
<a href="{url path='/admin/home'}">{intl l="Home"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url path='/admin/modules'}">{intl l="Modules"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url path='/admin/module/PayPal'}">{intl l="PayPal"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url path='/admin/module/paypal/configure/planified'}">{intl l="Planified payment" d="paypal.bo.default"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
{include file="paypal/menu/menu.html" selectedMenu="planifiedPayment"}
|
||||
|
||||
<div class="tab-content">
|
||||
<!-- Countries managing tab -->
|
||||
<div class="tab-pane active form-container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<h3>
|
||||
<span class="label label-primary">1</span>
|
||||
{intl l="Planified payment configuration" d="paypal.bo.default"}
|
||||
</h3>
|
||||
|
||||
<div class="col-md-12 alert alert-info">
|
||||
<div class="col-md-8">
|
||||
<h4 class="text-uppercase">
|
||||
<span class="glyphicon glyphicon-info-sign"></span> {intl l="Help" d="paypal.bo.default"} :
|
||||
</h4>
|
||||
<div class="tips">
|
||||
{intl l="This feature uses PayPal's Billing Plan and Agreement. It allows debiting a client recursively directly from PayPal." d="paypal.bo.default"}
|
||||
<br />{intl l="These planned payments will appear in step 4 of the purchase tunnel when selecting the payment method." d="paypal.bo.default"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="tips__img">
|
||||
<img src="{image file='assets/paypal_agreement.jpeg' source="PayPal"}" alt="Payment configuration" class="img-responsive" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption class="clearfix">
|
||||
{intl l="List of planified payments" d="paypal.bo.default"}
|
||||
<span class="pull-right">
|
||||
<button class="btn btn-primary" title="{intl l='Add a planified payment' d='paypal.bo.default'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span> {intl l='Add a planified payment' d='paypal.bo.default'}
|
||||
</button>
|
||||
</span>
|
||||
</caption>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{intl l='Title' d="paypal.bo.default"}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{intl l='Details' d="paypal.bo.default"}
|
||||
</th>
|
||||
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="paypal_planified_payment" type="paypal_planified_payment" backend_context=true order=$order}
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{$planifiedPayment->getTitle()} ;</strong><br />
|
||||
{$planifiedPayment->getDescription()}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<strong>{intl l='Frequency interval' d="paypal.bo.default"} : </strong>{$planifiedPayment->getFrequencyInterval()}<br />
|
||||
<strong>{intl l='Frequency' d="paypal.bo.default"} : </strong>{$planifiedPayment->getFrequency()}<br />
|
||||
<strong>{intl l='Cycle' d="paypal.bo.default"} : </strong>{$planifiedPayment->getCycle()}<br />
|
||||
<strong>{intl l='Min amount' d="paypal.bo.default"} : </strong>{if $planifiedPayment->getMinAmount() > 0}{format_money number=$planifiedPayment->getMinAmount()}{else}{intl l='None' d="paypal.bo.default"}{/if}<br />
|
||||
<strong>{intl l='Max amount' d="paypal.bo.default"} : </strong>{if $planifiedPayment->getMaxAmount() > 0}{format_money number=$planifiedPayment->getMaxAmount()}{else}{intl l='None' d="paypal.bo.default"}{/if}<br />
|
||||
</td>
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group btn-group-sm" >
|
||||
|
||||
<a class="btn btn-primary" title="{intl l='Edit this planified payment' d='paypal.bo.default'}" href="{url path="/admin/module/paypal/configure/planified/%id" id=$planifiedPayment->getId()}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
|
||||
<a class="btn btn-danger planified-payment-delete" title="{intl l='Delete this planified payment' d='paypal.bo.default'}" href="#delete_dialog" data-id="{$planifiedPayment->getId()}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{elseloop rel="paypal_planified_payment"}
|
||||
<tr>
|
||||
<td colspan="100">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No planified payment has been created yet. Click the + button to create one." d="paypal.bo.default"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Adding a new planified payment *}
|
||||
{form name="paypal_planified_payment_create_form"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "creation_dialog"}
|
||||
{form_hidden_fields}
|
||||
|
||||
{include file = "paypal/form/create-or-update-planified-payment-form.html"}
|
||||
|
||||
{render_form_field field="success_url" value={url path='/admin/module/paypal/configure/planified'}}
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "creation_dialog"
|
||||
dialog_title = {intl l="Create a new planified payment" d="paypal.bo.default"}
|
||||
dialog_body = {$smarty.capture.creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this planified payment" d="paypal.bo.default"}
|
||||
|
||||
form_action = {url path='/admin/module/paypal/configure/planified/create'}
|
||||
form_enctype = {form_enctype}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
{* Delete confirmation dialog *}
|
||||
{capture "delete_dialog"}
|
||||
<input type="hidden" name="planifiedPaymentId" id="planifiedPaymentId" value="" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_dialog"
|
||||
dialog_title = {intl l="Delete planified payment" d="paypal.bo.default"}
|
||||
dialog_message = {intl l="Do you really want to delete this planified payment ?" d="paypal.bo.default"}
|
||||
|
||||
form_action = {token_url path='/admin/module/paypal/configure/planified/create/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
<script>
|
||||
$(function() {
|
||||
// Set proper planified ID in delete from
|
||||
$('a.planified-payment-delete').click(function(ev) {
|
||||
$('#planifiedPaymentId').val($(this).data('id'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -0,0 +1,23 @@
|
||||
{extends file="email-layout.tpl"}
|
||||
|
||||
{* Do not provide a "Open in browser" link *}
|
||||
{block name="browser"}{/block}
|
||||
{* No pre-header *}
|
||||
{block name="pre-header"}{/block}
|
||||
|
||||
{* Subject *}
|
||||
{block name="email-subject"}{intl d='paypal.mail.default' l="Payment of your order %ref" ref={$order_ref}}{/block}
|
||||
|
||||
{* Title *}
|
||||
{block name="email-title"}{intl d='paypal.mail.default' l="The payment of your order %ref is confirmed" ref={$order_ref}}{/block}
|
||||
|
||||
{* Content *}
|
||||
{block name="email-content"}
|
||||
<p>
|
||||
<a href="{url path="/account"}">
|
||||
{intl l="View this order in your account at %shop_name" shop_name={config key="store_name"}}
|
||||
</a>
|
||||
</p>
|
||||
<p>{intl d='paypal.email.default' l='Thank you again for your purchase.'}</p>
|
||||
<p>{intl d='paypal.email.default' l='The %store_name team.' store_name={config key="store_name"}}</p>
|
||||
{/block}
|
||||
@@ -0,0 +1,9 @@
|
||||
{intl d='paypal.email.default' l='Dear customer'},
|
||||
|
||||
{intl d='paypal.email.default' l='This is a confirmation of the payment of your order %ref via Paypal on our shop.' ref=$order_ref}
|
||||
|
||||
{intl d='paypal.email.default' l='Your invoice is now available in your customer account at %url.'} url={config key="url_site"}}
|
||||
|
||||
{intl d='paypal.email.default' l='Thank you again for your purchase.'}
|
||||
|
||||
{intl d='paypal.email.default' l='The %store_name team.' store_name={config key="store_name"}}
|
||||
@@ -0,0 +1,23 @@
|
||||
{extends file="email-layout.tpl"}
|
||||
|
||||
{* Do not provide a "Open in browser" link *}
|
||||
{block name="browser"}{/block}
|
||||
{* No pre-header *}
|
||||
{block name="pre-header"}{/block}
|
||||
|
||||
{* Subject *}
|
||||
{block name="email-subject"}{intl d='paypal.mail.default' l="Payment of your order %ref" ref={$order_ref}}{/block}
|
||||
|
||||
{* Title *}
|
||||
{block name="email-title"}{intl d='paypal.mail.default' l="The payment of your order %ref is confirmed" ref={$order_ref}}{/block}
|
||||
|
||||
{* Content *}
|
||||
{block name="email-content"}
|
||||
<p>
|
||||
<a href="{url path="/account"}">
|
||||
{intl l="View this order in your account at %shop_name" shop_name={config key="store_name"}}
|
||||
</a>
|
||||
</p>
|
||||
<p>{intl d='paypal.email.default' l='Thank you again for your purchase.'}</p>
|
||||
<p>{intl d='paypal.email.default' l='The %store_name team.' store_name={config key="store_name"}}</p>
|
||||
{/block}
|
||||
@@ -0,0 +1,9 @@
|
||||
{intl d='paypal.email.default' l='Dear customer'},
|
||||
|
||||
{intl d='paypal.email.default' l='This is a confirmation of the payment of your order %ref via Paypal on our shop.' ref=$order_ref}
|
||||
|
||||
{intl d='paypal.email.default' l='Your invoice is now available in your customer account at %url.'} url={config key="url_site"}}
|
||||
|
||||
{intl d='paypal.email.default' l='Thank you again for your purchase.'}
|
||||
|
||||
{intl d='paypal.email.default' l='The %store_name team.' store_name={config key="store_name"}}
|
||||
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,11 @@
|
||||
<form id="paypal-express-checkout" method="post" action="{url path='/module/paypal/express/checkout'}" class="pull-right"></form>
|
||||
<script>
|
||||
window.paypalCheckoutReady = function() {
|
||||
paypal.checkout.setup('{$paypal_merchantid}', {
|
||||
environment: '{$paypal_mode}',
|
||||
container: 'paypal-express-checkout',
|
||||
locale: '{lang attr="locale"}'
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<script src="//www.paypalobjects.com/api/checkout.js" async></script>
|
||||
@@ -0,0 +1,85 @@
|
||||
<fieldset class="col-xs-11 col-xs-offset-1">
|
||||
<input type="radio" id="{$label_attr.for}{$choice->label}" class="paypal-method" name="{$name}" data-content="#content-paypal-credit-card" value="{$choice->label}" {if $value == $choice->label}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$choice->label}"><strong>{intl l=$choice->label d="paypal.fo.default"}</strong> :<br />{if $required} <span class="required">*</span>{/if}</label>
|
||||
<img src="{image file='assets/cards-logo.jpg' source="PayPal"}" border="0" alt="CB / VISA / Mastercard" />
|
||||
|
||||
<div id="content-paypal-credit-card" class="hidden">
|
||||
{form_field field='paypal_credit_card_type.card_type'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
|
||||
<select name="{$name}" id="{$label_attr.for}">
|
||||
{foreach from=$choices item=type}
|
||||
<option value="{$type->value}">{$type->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='paypal_credit_card_type.card_number'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
<input type="text" name="{$name}" id="{$label_attr.for}" value="" />
|
||||
</div>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='paypal_credit_card_type.card_expire_month'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
<select name="{$name}" id="{$label_attr.for}">
|
||||
{foreach from=$choices item=type}
|
||||
<option value="{$type->value}">{$type->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='paypal_credit_card_type.card_expire_year'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
<select name="{$name}" id="{$label_attr.for}">
|
||||
{foreach from=$choices item=type}
|
||||
<option value="{$type->value}">{$type->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='paypal_credit_card_type.card_cvv'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
<input type="text" name="{$name}" id="{$label_attr.for}" value="" />
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,17 @@
|
||||
<fieldset class="col-xs-11 col-xs-offset-1">
|
||||
{if $method_paypal_with_in_context}
|
||||
<input type="radio" id="{$label_attr.for}{$choice->label}-express" class="paypal-method paypal-express-method" name="{$name}" value="{$choice->label}" {if $value == $choice->label}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$choice->label}-express">
|
||||
<strong>{intl l=$choice->label d="paypal.fo.default"}</strong> :
|
||||
<img src="{image file='assets/paypal-logo.png' source="PayPal"}" border="0" alt="PayPal account" />
|
||||
</label>
|
||||
{else}
|
||||
<input type="radio" id="{$label_attr.for}{$choice->label}" class="paypal-method" name="{$name}" value="{$choice->label}" {if $value == $choice->label}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$choice->label}">
|
||||
<strong>{intl l=$choice->label d="paypal.fo.default"}</strong> :
|
||||
<img src="{image file='assets/paypal-logo.png' source="PayPal"}" border="0" alt="PayPal account" />
|
||||
</label>
|
||||
{/if}
|
||||
|
||||
|
||||
</fieldset>
|
||||
@@ -0,0 +1,26 @@
|
||||
{assign var="methodName" value=$name}
|
||||
{form_field field='paypal_planified_payment'}
|
||||
{if count($choices) > 0}
|
||||
<fieldset class="col-xs-11 col-xs-offset-1">
|
||||
<input type="radio" id="{$label_attr.for}{$choice->label}" class="paypal-method" name="{$methodName}" data-content="#content-paypal-planified-payment" value="{$choice->label}" {if $value == $choice->label}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$choice->label}"><strong>{intl l=$choice->label d="paypal.fo.default"}</strong> :<br />{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div id="content-paypal-planified-payment" class="hidden">
|
||||
{foreach $choices as $choice}
|
||||
{assign var="planifiedPayment" value=$choice->data}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<div class="control-input col-sm-5">
|
||||
<input type="radio" id="{$label_attr.for}{$planifiedPayment->getId()}" name="{$name}" value="{$planifiedPayment->getId()}" {if $value == $planifiedPayment->getId()}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$planifiedPayment->getId()}"><strong>{$planifiedPayment->getTitle()}</strong> :<br />{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{$planifiedPayment->getDescription()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</fieldset>
|
||||
{/if}
|
||||
{/form_field}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<article>
|
||||
<span id='lippButton'></span>
|
||||
<script src='https://www.paypalobjects.com/js/external/api.js'></script>
|
||||
<script>
|
||||
paypal.use( ['login'], function (login) {
|
||||
login.render ({
|
||||
"appid":'{$paypal_appid}',
|
||||
"authend":'{$paypal_authend}',
|
||||
"scopes":"profile email address phone https://uri.paypal.com/services/paypalattributes",
|
||||
"containerid":"lippButton",
|
||||
"locale":"fr-fr",
|
||||
"returnurl":'{url path="/module/paypal/login/ok"}'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</article>
|
||||
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
$('#form-cart-delivery button:submit').each(function() {
|
||||
if (!$(this).hasClass('paypal')) {
|
||||
$(this).addClass('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,4 @@
|
||||
<button class="btn btn-primary pull-right paypal" type="submit">
|
||||
<i class="fa fa-chevron-right"></i>
|
||||
{intl l='Finish payment with PayPal' d='paypal.fo.default'}
|
||||
</button>
|
||||
@@ -0,0 +1,11 @@
|
||||
<form id="paypal-express-checkout" method="post" action="{url path='/module/paypal/invoice/express/checkout'}" class="hidden"></form>
|
||||
<script>
|
||||
window.paypalCheckoutReady = function() {
|
||||
paypal.checkout.setup('{$paypal_merchantid}', {
|
||||
environment: '{$paypal_mode}',
|
||||
container: 'paypal-express-checkout',
|
||||
locale: '{lang attr="locale"}'
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<script src="//www.paypalobjects.com/api/checkout.js" async></script>
|
||||
@@ -0,0 +1,58 @@
|
||||
<script type="text/javascript">
|
||||
var payPalModuleId = '{$module_id}';
|
||||
|
||||
(function ($) {
|
||||
|
||||
{literal}
|
||||
$(document).ready(function () {
|
||||
var $payPal = $('#payment_' + payPalModuleId)
|
||||
, $payPalMethod = $('input:radio[class=paypal-method]')
|
||||
, hasSelection = false
|
||||
;
|
||||
|
||||
if ($payPal.prop('checked')) {
|
||||
$('#paypal-methods').removeClass('hidden');
|
||||
}
|
||||
|
||||
$('#payment-method input:radio').on('change', function() {
|
||||
if ($(this).attr('name') === 'thelia_order_payment[payment-module]') {
|
||||
if ($(this).attr('id') === $payPal.attr('id')) {
|
||||
$('#paypal-methods').removeClass('hidden');
|
||||
} else {
|
||||
$('#paypal-methods').addClass('hidden');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$payPalMethod.on('change', function() {
|
||||
//$payPalMethod.prop('checked', true);
|
||||
$($(this).data('content')).removeClass('hidden');
|
||||
|
||||
$('input:radio').each(function(){
|
||||
if ($(this).attr('name') == "thelia_order_payment[paypal_method]" && $(this).prop('checked')) {
|
||||
hasSelection = true;
|
||||
$($(this).data('content')).removeClass('hidden');
|
||||
} else {
|
||||
$($(this).data('content')).addClass('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('input:radio').each(function(){
|
||||
|
||||
if ($(this).attr('name') == "thelia_order_payment[paypal_method]" && $(this).prop('checked')) {
|
||||
hasSelection = true;
|
||||
$($(this).data('content')).removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('.paypal-express-method').on('click', function(){
|
||||
$('#paypal-express-checkout button').each(function(){
|
||||
$(this).trigger('click');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
{/literal}
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -0,0 +1,21 @@
|
||||
{form name="thelia.order.payment"}
|
||||
<div id="paypal-methods" class="row hidden">
|
||||
<hr>
|
||||
{form_field field='paypal_method'}
|
||||
{foreach from=$choices item=choice}
|
||||
|
||||
{if $choice->label == 'paypal' && {module_config key="method_paypal" module="PayPal" locale="en_US"} == 1}
|
||||
{include file="paypal/form/extra-paypal.html"}
|
||||
{/if}
|
||||
|
||||
{if $choice->label == 'credit_card' && {module_config key="method_credit_card" module="PayPal" locale="en_US"} == 1}
|
||||
{include file="paypal/form/extra-credit-card.html"}
|
||||
{/if}
|
||||
|
||||
{if $choice->label == 'planified_payment' && {module_config key="method_planified_payment" module="PayPal" locale="en_US"} == 1}
|
||||
{include file="paypal/form/extra-planified-payment.html"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/form_field}
|
||||
</div>
|
||||
{/form}
|
||||
@@ -0,0 +1,6 @@
|
||||
{loop type="paypal_order" name="paypal_order" id=$placed_order_id limit=1}
|
||||
{if $paypal_order->getPlanifiedCycle() > 0}
|
||||
<strong>{intl l="Planified payment" d="paypal.fo.default"}</strong> :
|
||||
{intl l="Payment in %x times every %frequency_interval %frequency" x=$paypal_order->getPlanifiedCycle() frequency_interval=$paypal_order->getPlanifiedFrequencyInterval() frequency="{intl l=$paypal_order->getPlanifiedFrequency() d="paypal.fo.default"}" d="paypal.fo.default"}
|
||||
{/if}
|
||||
{/loop}
|
||||
@@ -0,0 +1,6 @@
|
||||
{loop type="paypal_order" name="paypal_order" id=$order limit=1}
|
||||
{if $paypal_order->getPlanifiedCycle() > 0}
|
||||
<strong>{intl l="Planified payment" d="paypal.pdf.default"}</strong> :
|
||||
{intl l="Payment in %x times every %frequency_interval %frequency" x=$paypal_order->getPlanifiedCycle() frequency_interval=$paypal_order->getPlanifiedFrequencyInterval() frequency="{intl l=$paypal_order->getPlanifiedFrequency() d="paypal.pdf.default"}" d="paypal.pdf.default"}
|
||||
{/if}
|
||||
{/loop}
|
||||