WooCommerce Paypal Form Won't Submit - ajax

Hey I customized my woocommerce checkout form to post some hidden input values to paypal instead of doing an ajax post but somehow the ajax post is overriding the normal post and sending its own value to paypal. Can someone help me with this issue please. The form is at...
http://www.dreamhomevacationrentals.com/hotels/spanish-modern-retreat/
Click "Availability" on the left and then click "Book Now" and fill in some dummy data to get to the cart page and then click "proceed to checkout" to see the paypal form.
~Alex

Related

virtuemart one page checkout payment method issue

I have my website with virtuemart 3 and joomla 3.
Virtuemart configuration One Page Checkout enabled and Ajax for OPC is selected.
there are 2 payment methods bank transfer and paypal.
My issue is initially whenever I go to checkout page and I select payment radio button, payment method is updated...If again I update payment method its not updated.
in short, only once payment method is updated. even If I hit save button its not updated.enter image description here
anyone suggest me?
Thanks

How to handle Stripe payment failure via AJAX, with standard page load for success? (using Laravel backend)

I've got a long and fairly complex form for a booking system that a user fills in, then pays using Stripe Checkout. I'm trying to figure out the best solution to both handle payment failure easily (so submitting form over AJAX so I don't have to try and regenerate the whole booking form with all the data the user's entered), whilst also handling payment success gracefully (so with a new page showing a booking summary and a different URL so if user clicks reload button in their browser it doesn't just take them back to the search results and booking form again)
I'm using a mixture of Laravel 5.4 and JS/JQuery to generate the booking form on the front end, and after Stripe Checkout (I'm using their standard simple integration pop up) it submits all the form + Stripe token etc back to a POST route in my Laravel backend. In my controller, I then try and charge the credit card using standard Stripe API and process the booking details into my database, and then return a Laravel view from a Blade template thus giving the user a different page and URL. As mentioned I want to switch the form submission to AJAX so payment failure can be handled easily (i.e. their big filled in form doesn't disappear, and just an alert pops up to user so they can try and enter a new card into the Stripe Checkout). That bit's fine, I'll just use this: https://stackoverflow.com/a/34099169/4059141 but then in payment succeeds I basically want the same behaviour as if I'd done a regular form POST, so the new page being displayed with a new URL.
I can generate and pass back the rendered HTML from the blade template over AJAX no problem, but that leaves the original URL in the browser's address bar, so if they hit reload on the booking summary they'll just see the search results page and blank booking form again - not what I want.
Any thoughts on a solution are welcome! Thanks

Subscribe to newsletter, mailchimp

Is it possible to have single button on website that leads user to MailChimp subscribe form that is not physically on that website? Like for example MailChimp "Thank you" page.
Go to MailChimp Dashboard.
Select the list that you want to setup the subscriber form.
Go to 'Signup forms'
Select 'General forms'
Build the form and copy 'Signup form URL'
Use the URL in your website, which leads anyone to the subscription form of your MailChimp list.

How can I extend Magento to override payment info validation?

I am building a Magento extension to handle Level 3 payments through PayTrace's payment gateway. This particular payment method allows customers to select a saved credit card via Paytrace's customer info management (tokenized saved cards) instead of entering credit card information.
I can use Prototype, I understand how to add validation classes to the HTML in the template.
But the other validation is stumping me. I want to be able to submit the payment card's Paytrace id and not a credit card # and expiration date. When I add a select to the template and submit the selected card id, it pops up a javascript alert telling me "Incorrect credit card expiration date".
There is a request to "/checkout/onepage/savePayment" when I click "continue" that comes back with json {"error":"Incorrect credit card expiration date."} so this validation appears to occur via PHP on the server side.
My question here is "how do I extend Magento to override the server side one page checkout validation for payment?"

Braintree - Form validation before opening the lightbox

This is the first time I am implementing Braintree.js, I am using "Add PayPal button" approach to display the PayPal button on the page. Once the PayPal button is generated (by passing braintree token) I need to invoke some Ajax function to validate the form fields and once these are validated then only want to open the PayPal lightbox and get the nonce value after the final submit on the lightbox. How do I implement the ajax call using the braintree generated "PayPal" button BEFORE opening the lightbox. Any help would be greatly appreciated. Thanks in anticipation.
Currently there is not a callback that fires before the PayPal lightbox or popup opens.
Correct me if I'm wrong, but it sounds like you want to use the PayPal button as your form's submit button, which is not that button's intended function. Using Braintree's PayPal integration returns a nonce which you can then submit along with rest of your form as a separate action. When a user submits the form, you can validate that your form fields are valid, and that a nonce has been successfully generated before submitting it.
For a more in-depth description of integrating with PayPal visit Braintree's PayPal Guide.
Let me know if you have any other questions.

Resources