I need to submit my cart to paypal in a <form />, (using the web payments standard option).
Rather than draw the contents of this form to the page, and have the 'place order' button post directly to paypal.com, is it possible to have the 'place order' button post back to me, for me to then post the cart, and redirect the user to the correct location?
If not the only option i could see would be to post the cart to paypal myself, retrieve some unique id, and then redirect the user to a page with this unique id, however i dont think 'web payments standard' supports this.
Paypal uses whats called IPN (Instant Payment Notification). You should have all your customer's data saved with some kind of identifier. Post your form to paypal including the identifier. They will post the results back to a page you have designated. This will allow you to match the results they are sending you with your saved data via your identifier so you can now process the order.
Copy Paste Code Sample:
http://forums.asp.net/t/92314.aspx
Related
I have a CPT programs where details (title, date, time, instructor etc. field) about the program are added. There's also a custom filed status which indicates if the program is active or not. By default it is set to active whenever a new program is added. Below the program details page I have a registration button which triggers a registration form. With wpmail + wpforms plugin, after the submission of form I'm sending form data to both user and admin.
But now I have to send email to the registered users whenever a program gets cancelled or status is changed. In my case the CPT and registration form where the user puts his email are both separate.
So how do I accomplish this? I know I can use some event manager plugin but in my case all of those events fields are already covered by ACF. So is there any way to do this within CPT or other options?
I know the methods of tracking a form submission but in this case unfortunately I couldn't make it. Once the form is submitted, you can see in the debug mode that the exact same variables fire as in the case that the user tried to submit that form and it failed (because some fields weren't filled in). So the variables of GTM upon submitting don't help.
I tried another approach, with the url redirect. But the thing is that the redirection is to site.com/buy?add-to-cart, and this parameter causes adding to cart and then it redirects to the checkout page. This checkout page can be reached from many places so I can't track the form submission with page view either.
I don't know what to do already, is there another way that I didn't think of?
Thanks in advance
I'm wondering if it's possible to use a saleforce form for registering users on wordpress so that when a user registers on the frontend their details are sent to saleforce CRM?
The answer would vary depending on what form tool, if any, you're using, but lately I've been using Gravity Forms and have had great success with connecting to Salesforce via a custom Gravity forms redirect confirmation.
Once you have a form built in Gravity Forms, go to Form Settings > Confirmations. Edit the default Confirmation and change to Type "Redirect". You'll want to post the form to Salesforce's Web-To-Lead API, so enter https://www.salesforce.com/servlet/servlet.WebToLead in the Redirect URL field.
You'll then pass the fields you need via a query string, so check the 'Pass Field Data Via Query String' box, then configure the query string with Salesforce field names and Gravity forms merge tags. There are a couple required parameters including the encoding, your Salesforce Company ID, and a return URL to redirect back to after the form is submitted.
Leave off the ? to begin the query string, so it looks like
encoding=UTF-8&oid=0123456789&retURL=http://example.com
then add fields such as first name, last name, company, country, etc. by adding a parameter for each and selecting the appropriate Gravity Form merge tag from the menu on the right. It will end up looking something like
&first_name={First Name:1}&last_name={Last Name:2}&company={Company:3}
You can also send data to custom fields in Salesforce if you find the field ID. The easiest way to do this is by creating a Web-to-lead form in Salesforce and copying the field's name.
All together, your confirmation should look something like this -
For bonus points, you could add a hidden field to the form for the Return URL and populate it dynamically on the page, either by pulling the current page URL, or adding a custom field to choose a Return URL dynamically.
If you're not using Gravity Forms, you can still use Salesforce's Web-To-Lead tool by creating your own form, or using theirs, and sending the data in a query string.
There are various plugins that allow you to send data to Salesforce from a form, such as WordPress-to-lead for Salesforce CRM.
It is also possible to use the Salesforce API to build a single signon, and register users to or from either service. I built one for SugarCRM, which you can view the code for it at Github to get an idea of how it might work with Salesforce.
I use checkout by amazon or by paypal express checkout, when user clicks on amazon or on pay pal , when control comes back on my site after logging in paypal or on amazone, I have no extra checkout field, that I created using checkout field editor ('How did you find Us?'), Just the order summary is listed, how can I show my extra created field?
I use woocommerce plugin for shopping cart.
Checkout fields are only shown on checkout, when someone returns from a payment gateway (paypal in your case) by default they are logged in. So in order to show a text area after someone returns from paypal, you will have to edit the order summary template and add a check to it. So if the user is reffered from paypal, only then they will see your custom form.
A better way would be by using "woocommerce_payment_complete" hook and redirect the user to another page where you can add your custom functionality/ Gravity form shortcode or use contact form 7.
On my .NET website I use both "Buy Now" and "Subscribe" buttons.
The "buy now" button works OK: after buying the visitor is returned to website and I see his Paypal details in POST (via Firebug), and I can access them with "Request.Form("...")
However, when I use "Subscribe" button, the user is returned to website with only empty GET request, as he was simply entering the URL.
I use custom buttons. I tried also Paypal generated button - the same effect - no POST section.
Both buttons are on the same page
I use auto-redirect defined in Paypal
IPN enabled (and works for "buy now").
How I can get the buyer's details when he does monthly subscription?
Are you using the return and rm parameters in your Subscribe button? PayPal's docs state the following for the rm parameter, which sounds like what you need to adjust.
Return method. The FORM METHOD used to send data to the URL specified
by the return variable. Allowable values are:
0 – all shopping cart payments use the GET method
1 – the buyer's
browser is redirected to the return URL by using the GET method, but
no payment variables are included
2 – the buyer's browser is
redirected to the return URL by using the POST method, and all payment
variables are included The default is 0.
Note: The rm variable takes effect only if the return variable is set.