Skip to content

Commit

Permalink
Update PayPal integration (#372)
Browse files Browse the repository at this point in the history
* Upgrade PHP CKO SDK to 3.0.20 and update code to use new namespace

* WIP: PayPal Integration updates

* Update PayPal integration with new method
  • Loading branch information
SanketChodavadiya authored Mar 15, 2024
1 parent 6b0c9ef commit 6875bde
Show file tree
Hide file tree
Showing 11 changed files with 946 additions and 240 deletions.
8 changes: 7 additions & 1 deletion assets/js/cko-google-pay-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,20 @@ jQuery( function ( $ ) {
if ( jQuery( this ).val() === DOMStrings.paymentMethodName ) {
// Google Pay selected.
jQuery( '#ckocom_googlePay' ).show();
jQuery( '#paypal-button-container' ).hide();

jQuery( DOMStrings.placeOrder ).hide()
jQuery( '#place_order' ).prop( "disabled", true );

} else if ( 'wc_checkout_com_apple_pay' === this.value ) {
jQuery( '#paypal-button-container' ).hide();
jQuery( '#ckocom_googlePay' ).hide();
jQuery( "#place_order" ).hide();
} else {
} else if ( 'wc_checkout_com_paypal' === this.value ) {
jQuery( '#ckocom_googlePay' ).hide();
jQuery( '#ckocom_applePay' ).hide();
jQuery( "#place_order" ).hide();
} else {
jQuery( '#ckocom_googlePay' ).hide();

jQuery( '#place_order' ).prop( "disabled", false );
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"require": {
"php": ">=7.3",
"checkout/checkout-sdk-php": "3.0.20"
"checkout/checkout-sdk-php": "3.0.*"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.6",
Expand Down
Loading

0 comments on commit 6875bde

Please sign in to comment.