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

TR-68: BNPL integration #41

Open
wants to merge 47 commits into
base: release/next-release
Choose a base branch
from

Conversation

apetrovici
Copy link
Owner

@todo: X-GP-SIGNATURE validation after new version of PHP-SDK release

apetrovici and others added 30 commits November 9, 2022 11:29
@apetrovici apetrovici requested a review from ahumulescu January 25, 2023 09:23
src/Utils/Utils.php Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
( function ( $ ) { function GlobalPaymentsBNPLWooCommerce() { this.attachEventHandlers(); }; GlobalPaymentsBNPLWooCommerce.prototype = { /** * Add important event handlers for controlling the payment experience during checkout * * @returns */ attachEventHandlers: function () { var self = this; // Fix `Checkout` and `Order Pay` pages after back button $( window ).on( 'pageshow' , function( e ) { if ( e.originalEvent.persisted ) { $( document.body ).on( 'wc_fragments_ajax_error', function () { $( document.body ).trigger( 'wc_fragment_refresh' ); } ); $( document.body ).on( 'wc_fragments_refreshed', function () { $( self.getForm() ).unblock(); } ); } } ); }, /** * Gets the current checkout form * * @returns {Element} */ getForm: function () { var checkoutForms = [ // Order Pay 'form#order_review', // Checkout 'form[name="checkout"]', // Add payment method 'form#add_payment_method', // Admin Order Pay 'form#wc-globalpayments-pay-order-form', ]; var forms = document.querySelectorAll( checkoutForms.join( ',' ) ); return forms.item( 0 ); }, }; if ( ! window.GlobalPaymentsBNPLWooCommerce ) { window.GlobalPaymentsBNPLWooCommerce = new GlobalPaymentsBNPLWooCommerce(); }} ( ( window ).jQuery) );
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file has the wrong content formatting after the last commit. We need to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants