PayPal Website Payments Standard
PayPal Website Payments Standard allows users to pay with either their PayPal account or a credit card, but the payment happens on the PayPal site. If you use only PayPal Standard and no other payment options, then you can get away with not having an SSL certificate, because no sensitive information is entered directly in your site. PayPal passes a token back to our site then the mojoportal code uses that token to make a secure SSL request to PayPal to get the details. There is no monthly fee to use PayPal Standard so it is easy and affordable. mojoPortal implements both the Payment Data Transfer (PDT) and Instant Payment Notification (IPN) handlers so that we can know when the final payment has cleared. In most cases payment clears very quickly but if the user pays on PayPal using an echeck it can take longer.
Web.config/user.config Settings
These settings are needed for PayPal Standard:
<add key="Site1-PaymentGatewayUseTestMode" value="false" />
<add key="Site1-PayPalUsePayPalStandard" value="true" />
<add key="Site1-PayPalStandardProductionEmail" value="" />
<add key="Site1-PayPalStandardProductionPDTId" value="" />
Note that all the settings are prefixed with Site1-
In most cases this will be correct for a single site installation because the first site will typically have SiteID = 1, however you may want to verify your SiteID by looking in the mp_Sites table. If you SiteID is 2 then your prefix will be Site2- and so on depending on your SiteID.
After you sign into your PayPal account:
-
click Profile from the My Account menu, then in the right side click Website Payment Preferences.
-
Set Auto Return to "On"
-
for the return url enter http://yoursiteroot/Services/PayPalPDTHandler.aspx
-
Set Payment Data Transfer to "On"
-
Copy the Identity Token and paste it into your setting for Site1-PayPalStandardProductionPDTId
-
enter the email address associated with your PayPal account for Site1-PayPalStandardProductionEmail
-
click the link for "Back to Profile Summary", then click the link on the right for Instant Payment Notification Preferences
-
click Edit Settings
-
Set the notification url to http://yoursiteroot/Services/PayPalIPNHandler.aspx and enable IPN.
If PayPal Standard will be your only or primary payment system then you also need this setting:
<add key="Site1-PrimaryPaymentGateway" value="PayPalStandard"/>
To test with the sandbox, you would need these settings:
<add key="Site1-PaymentGatewayUseTestMode" value="true" />
<add key="Site1-PayPalStandardSandboxEmail" value="" />
<add key="Site1-PayPalStandardSandboxPDTId" value="" />
However, I would recommend don't bother with the sandbox for the following reasons:
-
It is extremely difficult to get the sandbox working, production is much easier, believe me on this and save yourself some unnecessary stress.
-
Even if you did manage to test with the sandbox, you still need to also test production with order(s) before real customers show up, so there is not much benefit to testing in the sandbox.
When you test on production you can configure a test product priced at $1, since the money goes into your account the only cost is the transaction fee which will be around 35 cents per transaction on a $1 product.
Note that PayPal returns a contact phone number only if your Merchant account profile settings require the buyer to enter one.