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.
Related
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.
is there an sandbox account for testing Bill Me Later just like paypal?
BML (PayPal Credit) is now tied into Express Checkout directly. Just do a regular EC integration, but in your SetExpressCheckout request you'll set the following:
USERSELECTEDFUNDINGSOURCE=BML
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
So then you can just have two separate buttons on your checkout page, and if they click the BML/Credit button you'll add the extra parameters.
The buyer gets a different experience depending on whether those params are added or not.
We use PayPal's Payments Pro NVP API to provide seamless credit card and paypal processing on our site. We've created an iframe-based cart widget that our customers put onto their site so their users can purchase items and pay via our Paypal account.
While credit card transactions work fine, we're seeing issues when a user tries to pay with their the PayPal account. The API uses a redirect when clicking the PayPal logo but then PayPal's code seems to run a framebusting script and the transaction can't continue.
I am seeking suggestions or sample code for how to handle users wishing to PayPal for their payment via the iframe. One option is to pop-up a new window but then it leaves the design open to issues since the user can switch between that window and the window containing the iframe and conceivably get the cart out of sync with what the PayPal window is displaying.
Both of the above answers are correct. However, PayPal tech support provided a more thorough set of instructions which I've provided below. Hopefully they'll help someone else.
Modify your SetExpressCheckout calls so that the RETURNURL and CANCELURL parameters point to a special return page that will handle closing the pop-up window for you and continuing the normal checkout process (more on this later).
Next, modify the script that redirects the buyer over to the PayPal website. Normally, this script would return a “302 Found” (or similar) response to the browser, telling the browser that it should follow a redirect to some other page. (In PHP, this is usually accomplished with the “header” function – e.g., header(“Location: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=$token”); .) Instead, this script should emit the following HTML/JavaScript code (replacing “TOKEN” with the token you received from PayPal). This will open a pop-up window where the buyer can continue the checkout process on PayPal. You can insert additional text, as you like, to indicate to the buyer that they should be using the pop-up window to complete their checkout. To avoid issues with pop-up blockers, you can create a link or button on your page, indicating to the buyer that they should click the link/button to continue, and use this code for the object’s “onClick” handler.
<script type="text/javascript">
window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=TOKEN","_blank","width=1024,height=768,location=1,resizable=1,scrollbars=1,status=1",true);
</script>
Now, create a new page that executes the following code (or similar – this code is based on PHP, adjust as necessary for whatever language you are using). This code will close the pop-up window and continue the checkout process in your existing iframe. The RETURNURL parameter of your SetExpressCheckout call should point to this page. Replace “paypalreturn.php” with the script you currently use to handle buyers returning to your shopping cart from PayPal.
<html>
<body>
<script type="text/javascript">
window.opener.location="http://www.regattacentral.com/paypalreturn.php?token=<? echo $_REQUEST["token"]; ?>&PayerID=<? echo $_REQUEST["PayerID"]; ?>";
window.close();
</script>
</body>
</html>
Lastly, repeat this step for your CANCELURL handler.
• The purchase completes inside of the iframe, and the transaction ID for the purchase is shown.
PayPal Express Checkout / 'Pay with PayPal' in Pro Hosted does not support iframes for security reasons. Opening a pop up window (or setting target=_parent) is the only way to process this properly.
Set your form target to - target="_top"
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