Paypal with Contact Form 7 - php

I have a problem contact form 7. I want payment with paypal combined contact form 7 . Picture :
Any suggestion for me?
Thanks.

There are several ways to solve this. You can either (a) redirect your submitted form to the paypal page on successful submission , or you could look at (b) building a paypal button on the fly when the form is being filled.
To implement solution (a) I would recommend your map your form to a custom using the Post My CF7 Form plugin. The plugin allows you to either hook into the submission process once the post is saved and integrate the paypal payment page (from PHP) using the saved fields, or you can also redirect to a confirmation page on your site with the amount to be paid and a paypal button. The advantage of saving your submission to a custom post means you can also save the paypal payment confirmation in the same post and keep a track of your payments.
For solution (b), just bind a 'change' event on your fields that affect the payment and build the paypal button url accordingly, see this answer as an example.
PS: If you wish to create a responsive grid-layout as shown in your screenshot, I would recommend the Smart Grid plugin extention to achieve a responsive grid layout that you have on your screenshot.

Related

Wordpress - Hook on submit form

On a page managed by each customer of my Wordpress website, I have a form with multiple fields, not only Wordpress core fields, but also WooCommerce fields, JetEngine fields, etc.
I need to update the user data on another app, via API. I can't find a hook where I can plug my own function, hook fired when all other hook are processed. Because if I hook profile_update, for example, the updated_user_meta calls have not been made, and all the data are not updated yet.
So my thought led me to find a hook which is fired when the form is submit. This way I will be able to get the form fields in my function (called with add_action) and then launch my API calls.
The problem is I can't find a hook which is fired on form submit. Do you have any idea of how I can manage that?
Thanks for your help!
PS: this question is not helping, because it's about admin form, and I'm not on admin side but on customer side, on his profile form.

Use woocommerce with calculated quot from front end

I'm developing a website for a courier service, that has service quotation filling at the front end.
I did all form things working, a quotation will output variable with the cost of service in PHP.
After filling the form there will be checkout button, with that checkout button i need to save the details of the user, and that price to the woo commerce page to check-out/or fill further details. I searched throughout the google and got 1 solution to create a product with these values in front end. But its became very difficult to figuring out signing in, saving values, keep details in specific formate etc... for me as a beginner in PHP.
Can anyone help me with this?.
i just need woo commerce to make checkout with user entered details in the form.... .
EDIT & Updated :
Thanks for reply LoicTheAztec, I have gone through quick toure now
About code : I'm sending the values calculated in form to the page called buy-now using URL using javascript window.location.href=.
like http://example.com/buy-now?price=120&weight=80&location=000001
And also I'm able to fetch the value using
if (isset($wp_query->query_vars['pricef'])) in page template. (with StackOverflow help) and I'm checking user is logged in? using if(!is_user_logged_in()) and showing login form, After login also i can get the variables.
Now I need to create a transaction using this.
Saving data like a product or post and proceed for payment, I don't need to use woocommerce to do this but need some sort of idea to make it work.
Thank you.

Customization for Payment Gateway in opencart

So I am trying to set up a site on my localhost. I have selected 2 payment gateways from admin end
Online Payment (Free Shipping)
Cash On Delivery(Free Shipping/Flat COD Charge INR 50 )
Now I have customized all the rules for them. I only need one more rule.
I wish to have a functionality wherein I can enter some pincode/postcode values (through admin panel or maybe in some array in a javascript file or directly into the database, does not matter) of locations where second method is available)
Whenever someone presses continue before confirming order, the checkout form is validated so as to check from the form data if the value entered in post code matches the data (from any of the above methods) and if yes, only then they can continue or I wish to show an error message that
Following payment gateway is not available in your location
If you give me a hint on how to proceed with this, perhaps, I might be able to take it further. I am a bit or a starter in opencart so not much idea about how to proceed. I have sound knowledge of PHP, JQuery and Javascript although. So any and all help will be appreciated.
There are a few different extensions that already exist to do what you want - allow you to restrict shipping methods by various criteria. This one is my personal favorite: http://www.opencart.com/index.php?route=extension/extension/info&extension_id=1614
I managed it with JQuery for the time being. Edited the submit function in the cart.tpl file in catalog->view->theme->ancart (theme name) ->cart folder.
Used a plugin called "Zipcode COD" to enter zipcodes. Edited the response JQuery to hide and show payment options.
Lots of hard coding but does the trick. I will post the code if someone needs.

Pass dynamic value to Gravity Forms using PayPal

SCENARIO:
There is an events page which allows users to buy tickets for an event. Each event has a different ticket price, but they all use the same Gravity Form to process the payment through the Gravity Forms PayPal add-on.
PROBLEM:
How do you pass the price of an event from the events page to the Gravity Form for PayPal to process?
The user must not have access to change the price.
Setting the price via dynamic population is probably your best bet. Here is an article I wrote that sounds like it's spot on for your current scenario.
http://gravitywiz.com/dynamic-products-via-post-meta/

Integrate Google checkout with Gravity Forms

I've created a multi step form using gravity forms that I want to integrate Google checkout with.
I have the following steps:
Submit user details.
Add media.
Payment (this is where the Google checkout step would go).
Thank you.
As far as I can see Gravity forms uses jQuery to show/hide each step so on step 3 is it possible to insert a Google buynow button (that has a set price) using jQuery?
It doesn't matter if it means the client needs to manually check if the submission is paid for (i.e check the submission against the payment).
All I want to happen is the user goes through steps 1 & 2, pays at step 3 and comes back to the thank you page
Gravity forms doesn't currently offer a Google Checkout add-on (it offers Paypal) but because the submission has a single price that doesn't change, I'm wondering if there's a way to incorporate it in?
I hope you have pagebreak element to have the 4 steps of forms. In the payment part (after the second pagebreak, you can use HTML element to add your Google Checkout button.

Categories