MAJ Module Paypal vers 5.1.1 (comme en prod)
This commit is contained in:
@@ -1,28 +1,3 @@
|
||||
/**
|
||||
* 2007-2019 PrestaShop
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2019 PrestaShop SA
|
||||
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
// init in-context
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
$(document).on('click', '#desc-order-partial_refund', function(){
|
||||
if ($('#doPartialRefundPaypal').length == 0) {
|
||||
var newCheckBox = '<p class="checkbox"><label for="doPartialRefundPaypal">\n' +
|
||||
'<input type="checkbox" id="doPartialRefundPaypal" name="doPartialRefundPaypal">\n' +
|
||||
chb_paypal_refund + '</label></p>';
|
||||
$('button[name=partialRefund]').parent('.partial_refund_fields').prepend(newCheckBox);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/*! For license information please see bo_order.js.LICENSE */
|
||||
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1)}([,function(e,n){$(document).ready(function(){$(document).on("click","#desc-order-partial_refund",function(){if(0==$("#doPartialRefundPaypal").length){var e='<p class="checkbox"><label for="doPartialRefundPaypal">\n\t\t\t<input type="checkbox" id="doPartialRefundPaypal" name="doPartialRefundPaypal">\n '.concat(chb_paypal_refund,"</label></p>");$("button[name=partialRefund]").parent(".partial_refund_fields").prepend(e)}})})}]);
|
||||
//# sourceMappingURL=bo_order.js.map
|
||||
@@ -1,45 +1,3 @@
|
||||
/**
|
||||
* 2007-2019 PrestaShop
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2019 PrestaShop SA
|
||||
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
// init in-context
|
||||
document.addEventListener("DOMContentLoaded", function(){ window.paypalCheckoutReady = function() {
|
||||
paypal.checkout.setup(merchant_id, {
|
||||
environment: environment,
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
function ECInContext() {
|
||||
paypal.checkout.initXO();
|
||||
$.support.cors = true;
|
||||
$.ajax({
|
||||
url: url_token,
|
||||
type: "GET",
|
||||
|
||||
success: function (json) {
|
||||
if (json.success) {
|
||||
var url = paypal.checkout.urlPrefix +json.token;
|
||||
paypal.checkout.startFlow(url);
|
||||
} else {
|
||||
paypal.checkout.closeFlow();
|
||||
window.location.replace(json.redirect_link);
|
||||
}
|
||||
},
|
||||
error: function (responseData, textStatus, errorThrown) {
|
||||
alert("Error in ajax post"+responseData.statusText);
|
||||
paypal.checkout.closeFlow();
|
||||
}
|
||||
});
|
||||
}
|
||||
/*! For license information please see ec_in_context.js.LICENSE */
|
||||
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}({2:function(e,t){$(document).ready(function(){window.paypalCheckoutReady=function(){return paypal.checkout.setup(merchant_id,{environment:environment})}}),window.ECInContext=function(){paypal.checkout.initXO(),$.support.cors=!0,$.ajax({url:url_token,type:"GET",success:function(e){if(e.success){var t=paypal.checkout.urlPrefix+e.token;paypal.checkout.startFlow(t)}else paypal.checkout.closeFlow(),window.location.replace(e.redirect_link)},error:function(e,t,n){alert("Error in ajax post ".concat(e.statusText)),paypal.checkout.closeFlow()}})}}});
|
||||
//# sourceMappingURL=ec_in_context.js.map
|
||||
@@ -1,35 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2019 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* This source file is subject to a commercial license from SARL 202 ecommence
|
||||
* Use, copy, modification or distribution of this source file without written
|
||||
* license agreement from the SARL 202 ecommence is strictly forbidden.
|
||||
* In order to obtain a license, please contact us: tech@202-ecommerce.com
|
||||
* ...........................................................................
|
||||
* INFORMATION SUR LA LICENCE D'UTILISATION
|
||||
*
|
||||
* DISCLAIMER
|
||||
* L'utilisation de ce fichier source est soumise a une licence commerciale
|
||||
* concedee par la societe 202 ecommence
|
||||
* Toute utilisation, reproduction, modification ou distribution du present
|
||||
* fichier source sans contrat de licence ecrit de la part de la SARL 202 ecommence est
|
||||
* expressement interdite.
|
||||
* Pour obtenir une licence, veuillez contacter 202-ecommerce <tech@202-ecommerce.com>
|
||||
* ...........................................................................
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2019 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
* @author 202-ecommerce <tech@202-ecommerce.com>
|
||||
* @copyright Copyright (c) 202-ecommerce
|
||||
* @license Commercial license
|
||||
*/
|
||||
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
|
||||
@@ -1,17 +1,3 @@
|
||||
/**
|
||||
* 2007-2019 PrestaShop
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2019 PrestaShop SA
|
||||
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$('.page-order-confirmation #order-details ul').append($('#paypal_transaction_id'));
|
||||
});
|
||||
/*! For license information please see order_confirmation.js.LICENSE */
|
||||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}({3:function(e,t){$(document).ready(function(){return $(".page-order-confirmation #order-details ul").append($("[data-paypal-transaction-id]"))})}});
|
||||
//# sourceMappingURL=order_confirmation.js.map
|
||||
@@ -1,66 +1,3 @@
|
||||
/**
|
||||
* 2007-2019 PrestaShop
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2019 PrestaShop SA
|
||||
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
var ppp;
|
||||
$(document).ready(function() {
|
||||
if ($('section#checkout-payment-step').hasClass('js-current-step')) {
|
||||
if (ppp_mode == 'sandbox')
|
||||
showPui = true
|
||||
else
|
||||
showPui = false
|
||||
|
||||
ppp = PAYPAL.apps.PPP({
|
||||
"approvalUrl": ppp_approval_url,
|
||||
"placeholder": "ppplus",
|
||||
"mode": ppp_mode,
|
||||
"language": ppp_language_iso_code,
|
||||
"country": ppp_country_iso_code,
|
||||
"buttonLocation": "outside",
|
||||
"useraction": "continue",
|
||||
"showPuiOnSandbox": showPui,
|
||||
});
|
||||
}
|
||||
});
|
||||
exec_ppp_payment = true;
|
||||
function doPatchPPP() {
|
||||
if (exec_ppp_payment) {
|
||||
exec_ppp_payment = false;
|
||||
$.fancybox.open({
|
||||
content : '<div id="popup-ppp-waiting"><p>'+waiting_redirection+'</p></div>',
|
||||
closeClick : false,
|
||||
height : "auto",
|
||||
helpers : {
|
||||
overlay : {
|
||||
closeClick: false
|
||||
}
|
||||
},
|
||||
});
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : ajax_patch_url,
|
||||
dataType: 'json',
|
||||
success : function (json) {
|
||||
if (json.success) {
|
||||
ppp.doCheckout();
|
||||
} else {
|
||||
window.location.replace(json.redirect_link);
|
||||
}
|
||||
},
|
||||
error : function (xhr, ajaxOptions, thrownError) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*! For license information please see payment_ppp.js.LICENSE */
|
||||
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}({4:function(e,t){var n={},o=!0;$(document).ready(function(){if($("#checkout-payment-step").hasClass("js-current-step")){var e=!1;"sandbox"==modePPP&&(e=!0),n=PAYPAL.apps.PPP({approvalUrl:approvalUrlPPP,placeholder:"ppplus",mode:modePPP,language:languageIsoCodePPP,country:countryIsoCodePPP,buttonLocation:"outside",useraction:"continue",showPuiOnSandbox:e})}$("#payment-confirmation button").on("click",function(e){var t=$("input[name=payment-option]:checked").attr("id");$("#".concat(t,"-additional-information .payment_module")).hasClass("paypal-plus")&&(e.preventDefault(),e.stopPropagation(),r())})});var r=function(){o&&(o=!1,$.fancybox.open({content:'<div id="popup-ppp-waiting"><p>'.concat(waitingRedirectionMsg,"</p></div>"),closeClick:!1,height:"auto",helpers:{overlay:{closeClick:!1}}}),$.ajax({type:"POST",url:ajaxPatchUrl,dataType:"json",success:function(e){e.success?n.doCheckout():window.location.replace(e.redirect_link)}}))}}});
|
||||
//# sourceMappingURL=payment_ppp.js.map
|
||||
@@ -1,92 +1,3 @@
|
||||
/**
|
||||
* 2007-2019 PrestaShop
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2019 PrestaShop SA
|
||||
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
// init incontext
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
var ec_sc_qty_wanted = $('#quantity_wanted').val();
|
||||
var ec_sc_productId = $('#paypal_payment_form_cart input[name="id_product"]').val();
|
||||
EcCheckProductAvailability(ec_sc_qty_wanted, ec_sc_productId, $('#es_cs_product_attribute').val());
|
||||
prestashop.on('updatedProduct', function(e, xhr, settings) {
|
||||
EcCheckProductAvailability(ec_sc_qty_wanted, ec_sc_productId, e.id_product_attribute);
|
||||
});
|
||||
if (typeof ec_sc_in_context != "undefined" && ec_sc_in_context) {
|
||||
window.paypalCheckoutReady = function () {
|
||||
paypal.checkout.setup(merchant_id, {
|
||||
environment: ec_sc_environment,
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
function EcCheckProductAvailability(qty, productId, id_product_attribute) {
|
||||
$.ajax({
|
||||
url: sc_init_url,
|
||||
type: "POST",
|
||||
data: 'checkAvailability=1&source_page=product&id_product='+productId+'&quantity='+qty+'&product_attribute='+id_product_attribute,
|
||||
success: function (json) {
|
||||
if (json.success) {
|
||||
$('#container_express_checkout').show();
|
||||
} else {
|
||||
$('#container_express_checkout').hide();
|
||||
}
|
||||
},
|
||||
error: function (responseData, textStatus, errorThrown) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setInput()
|
||||
{
|
||||
$('#paypal_quantity').val($('[name="qty"]').val());
|
||||
var combination = [];
|
||||
var re = /group\[([0-9]+)\]/;
|
||||
$.each($('#add-to-cart-or-refresh').serializeArray(),function(key, item){
|
||||
if(res = item.name.match(re))
|
||||
{
|
||||
combination.push(res[1]+':'+item.value);
|
||||
}
|
||||
});
|
||||
$('#paypal_url_page').val(document.location.href);
|
||||
$('#paypal_combination').val(combination.join('|'));
|
||||
if (typeof ec_sc_in_context != "undefined" && ec_sc_in_context) {
|
||||
ECSInContext(combination);
|
||||
} else {
|
||||
$('#paypal_payment_form_cart').submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ECSInContext(combination) {
|
||||
paypal.checkout.initXO();
|
||||
$.support.cors = true;
|
||||
$.ajax({
|
||||
url: ec_sc_action_url,
|
||||
type: "GET",
|
||||
data: 'getToken=1&source_page=product&id_product='+$('#paypal_payment_form_cart input[name="id_product"]').val()+'&quantity='+$('[name="qty"]').val()+'&combination='+combination.join('|'),
|
||||
success: function (json) {
|
||||
if (json.success) {
|
||||
var url = paypal.checkout.urlPrefix +json.token;
|
||||
paypal.checkout.startFlow(url);
|
||||
} else {
|
||||
paypal.checkout.closeFlow();
|
||||
window.location.replace(json.redirect_link);
|
||||
}
|
||||
},
|
||||
error: function (responseData, textStatus, errorThrown) {
|
||||
alert("Error in ajax post"+responseData.statusText);
|
||||
|
||||
paypal.checkout.closeFlow();
|
||||
}
|
||||
});
|
||||
}
|
||||
/*! For license information please see shortcut.js.LICENSE */
|
||||
!function(t){var e={};function a(c){if(e[c])return e[c].exports;var n=e[c]={i:c,l:!1,exports:{}};return t[c].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=e,a.d=function(t,e,c){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:c})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(c,n,function(e){return t[e]}.bind(null,n));return c},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=6)}({6:function(t,e){$(document).ready(function(){var t=$("[data-container-express-checkout]").data("paypal-source-page");switch(t){case"product":var e=a();c(t,e.qty,e.id_product,e.id_product_attribute),prestashop.on("updatedProduct",function(e,n,o){var r=a();c(t,r.qty,r.id_product,e.id_product_attribute)});break;case"cart":prestashop.on("updateCart",function(){return c(t)})}"undefined"!=typeof ec_sc_in_context&&ec_sc_in_context&&(window.paypalCheckoutReady=function(){paypal.checkout.setup(merchant_id,{environment:ec_sc_environment})})});var a=function(){var t=new Object;return t.qty=$('input[name="qty"]').val(),t.id_product=$("[data-paypal-id-product]").val(),t.id_product_attribute=$("[data-paypal-id-product-attribute]").val(),t};$("[data-paypal-shortcut-btn]").on("click",function(){var t=$("[data-container-express-checkout]").data("paypal-source-page");switch($("[data-paypal-url-page]").val(document.location.href),t){case"product":var e=a(),c=[],o=/group\[([0-9]+)\]/;$("[data-paypal-qty]").val(e.qty),$.each($("#add-to-cart-or-refresh").serializeArray(),function(t,e){(res=e.name.match(o))&&c.push("".concat(res[1]," : ").concat(e.value))}),$("[data-paypal-combination]").val(c.join("|")),"undefined"!=typeof ec_sc_in_context&&ec_sc_in_context?n(t,c,e.qty,e.id_product):$("[data-paypal-payment-form-cart]").submit();break;case"cart":"undefined"!=typeof ec_sc_in_context&&ec_sc_in_context?n():$("[data-paypal-payment-form-cart]").submit()}});var c=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];$.ajax({url:sc_init_url,type:"POST",data:"checkAvailability=1&source_page=".concat(t).concat(a?"&id_product=".concat(a):"").concat(e?"&quantity=".concat(e):"").concat(c?"&product_attribute=".concat(c):""),success:function(t){t.success?$("[data-container-express-checkout]").show():$("[data-container-express-checkout]").hide()}})},n=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];paypal.checkout.initXO(),$.support.cors=!0,$.ajax({url:ec_sc_action_url,type:"GET",data:"getToken=1&source_page=".concat(t).concat(c?"&id_product=".concat(c):"").concat(a?"&quantity=".concat(a):"").concat(e?"&combination=".concat(e.join("|")):""),success:function(t){if(t.success){var e=paypal.checkout.urlPrefix+t.token;paypal.checkout.startFlow(e)}else paypal.checkout.closeFlow(),window.location.replace(t.redirect_link)},error:function(t){alert("Error in ajax post ".concat(t.statusText)),paypal.checkout.closeFlow()}})}}});
|
||||
//# sourceMappingURL=shortcut.js.map
|
||||
@@ -1,27 +1,3 @@
|
||||
/**
|
||||
* 2007-2019 PrestaShop
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2019 PrestaShop SA
|
||||
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
$(document).ready(function(){
|
||||
if ($('section#checkout-payment-step').hasClass('js-current-step')) {
|
||||
$('.payment-options div').hide();
|
||||
if ($('input[data-module-name=express_checkout_schortcut]').length > 0) {
|
||||
$('input[data-module-name=express_checkout_schortcut]').click();
|
||||
$('.payment-options').append($('#paypal-es-checked').show());
|
||||
} else if($('input[data-module-name=paypal_plus_schortcut]').length > 0) {
|
||||
$('input[data-module-name=paypal_plus_schortcut]').click();
|
||||
$('.payment-options').append($('#paypal-ppp-checked').show());
|
||||
}
|
||||
}
|
||||
});
|
||||
/*! For license information please see shortcut_payment.js.LICENSE */
|
||||
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}({5:function(e,t){$(document).ready(function(){if($("section#checkout-payment-step").hasClass("js-current-step")){var e=$('input[data-module-name="'.concat(paypalCheckedMethod,'"]'));$(".payment-options div").hide(),e.length>0&&(e.click(),$(".payment-options").append(scPaypalCheckedMsg))}})}});
|
||||
//# sourceMappingURL=shortcut_payment.js.map
|
||||
Reference in New Issue
Block a user