PayPal Payment Version 3.6 or Higher |
Copyright © 2000, William Weiland |
Overview The purpose of this module is to allow customers to place an order at a Miva Merchant © Miva Corp. enabled store which they will then pay for using their PayPal © x.com account. These instructions are used for the 4.x uncompiled (4.00-4.13) and compiled (4.14-4.2x) versions of Merchant. Please follow the initial install instructions for your version. |
|
Initial Install PayPal main module Merchant version 4.13 and older
Merchant version 4.14 and newer
If you are unsure which scenario above applies to you, contact us with as much info about your current and past PayPal modules as you can supply. We will also need your order number, Merchant version and full url to your merchant.mv(c) in order to better advise you. CIM Auxiliary System Extension module - ONLY Merchant version 4.14 and newer
Required PayPal stub files - Merchant version 4.13 and older FTP the paypal_1.mv and paypal_2.mv to the Merchant root directory, e.g. Merchant2/ This is the same directory that your merchant.mv file is located in. It should be the same directory that you have identified the Non-Secure URL to Miva Merchant in your Admin:Domain Settings:Site Configuration. These must be FTP'd; they are not installed as modules. Required PayPal stub files - Merchant version 4.14 and newer FTP the paypal_1.mvc and paypal_2.mvc to the Merchant root directory, e.g. Merchant2/ This is the same directory that your merchant.mvc file is located in. It should be the same directory that you have identified the Non-Secure URL to Miva Merchant in your Admin:Domain Settings:Site Configuration. These must be FTP'd; they are not installed as modules. PayPal Reports: If you are using the compiled version of Merchant (4.14+) you can also upload the optional reports module for creating summary reports. Individual payment details are available through the basic PayPal module (fig 1). The summary reports provide more info for broader time periods and multiple transactions (fig 2, 3). Warning: Since hackers continually come up with new schemes, you must always compare the order total in Miva Merchant with the money received at PayPal. You must go to https://www.paypal.com and verify the actual payment. |
|
Configuration Settings Enter data into the applicable input fields. Merchant Script Name PayPal ID PayPal Business Account URL to PayPal Conversion Rate from USD ($) Currency you accept as Default PayPal Logo URL (Merchant 2.0-4.13 uncompiled) PayPal Logo URL (Merchant 4.14+ compiled) Payment Method Prompt Additional Instructions Invoice Messages (HTML and plain text) - compiled version Instant Payment Notification (IPN) Additional Security Checks - compiled version |
|
Editing Requirements (skip if using the OpenUI) If you are using the Miva Merchant User Interface (mmui) you will need to make some very simple edits to the core files. Be sure to do that with a text editor (NO WYSIWYG editors) such as Programmer's File Editor (PFE) so as not to damage the mv files. ALWAYS BACKUP your unmodified mv files in case you make a mistake. Note: This section is not applicable to compiled Merchant. 1) If your account at PayPal is a "Personal" account, you will need to
edit the mmui.mv file to incorporate the hyperlink for PayPal payments to
personal accounts. Do NOT make this edit if your account is a Business or
Premier account. Locate the function UIModule_Invoice in the mmui.mv file.
Locate the second TABLE tag in this function if using Merchant 3.x or 4.x or
the first TABLE tag in this function if using Merchant 2.x: 2) Optionally, if you want to include a notation in the merchant email which type of
payment the buyer used, you can insert the following lines just above
the </MvSMTP> tag in your meremail.mv file for Merchant version less than 4.10.
In the meremail.mv and custeml starting with Merchant 4.10, locate the line: If you are using compiled Miva Merchant, file names ending with .mv above need to be changed to mvc. Then you will need to re-compile the meremail.mv into meremail.mvc. |
|
Editing Option (not applicable to compiled versions of Merchant) You can also change the text in your invoice note if your PayPal account is a "Personal" account, not Business or Premier. To do that, scroll down in the paypal.mv file to the function called PaymentModule_Payment_Link which contains the invoice text. This function contains the link which sends the customer to PayPal personal accounts after placing their order. This should only be changed if you have some experience at mivascripting. Backup before editing. |
|
Be Aware Because customers can spend a good bit of time setting up their PayPal account, you should be sure that you have a lengthy basket time out setting, e.g. 120 minutes. Typical time out error messages might be: "Your keyboard has been idle greater than 15 minutes. Therefore, your basket was automatically expired before you completed your order." or "Your basket's contents changed unexpectedly during the checkout process. Please press your browser's back button and restart the checkout process." To the customer who has been entering data at the PayPal site, this message might not make sense. The reality is that Merchant can only monitor keystrokes when they are entered in the URL containing merchant.mv (merchant.mvc compiled). When the customer is at the PayPal site, merchant.mv (merchant.mvc compiled) is not being refreshed periodically. |
|
Optional Phone-in Module The phonein.mvc is an optional file that does not need to be installed. Use it only if you want to have a phone-in option for customers. You would still need a terminal or virtual terminal to process the credit card numbers. That service is not free. For example, paypal.com has a virtual terminal for $20 per month plus per transaction fees. |
|
Frequently Asked Questions Q: The payment is made at PayPal.com but the store orders are never updated. The customer does not get an email and the order does not show up in admin. A: If this happens on every order your IPN posting is not correct between paypal.com and your Miva Merchant store. First, make sure you FTPd the intermediate handler files paypal_1.mv and paypal_2.mv (mvc if compiled) to the root Merchant2 directory. Also, make sure that the PayPal ID that you entered in the module's admin configuration screen is your correct and "verified" business or premier PayPal ID. You then have two options: 1) Check the box in the paypal module admin screen to send the IPN URL as a hidden input. Be sure you have nothing entered at paypal.com for IPN URL preference. 2) Go to paypal.com to your Profile:preferences. Then under IPN, check the box and enter the URL to post to. There is a sample URL on your paypal module admin screen which you can view for format. Modify it for your domain. An alternative way to get the IPN URL is to check the box as in option 1 above. Create an order and proceed to checkout. At the last checkout screen at your store, you can view the source to copy and paste to paypal.com the hidden input called notify_url. Then go back and uncheck the box in your paypal module admin. This will ensure that the IPN URL info is used only from the preferences that you entered at paypal.com. Note: This method cannot be used if your store is using the same paypal.com account as other Miva Merchant stores. Some people have multiple stores using one paypal.com account so the IPN URL has to be supplied by the paypal module in the store using it. A: If this happens only with some PayPal orders, then there is a transient Internet communication problem. Your server may be down when the paypal.com server tries to post the order completion data. Or the paypal.com server responsible for posting may go down between when the customer pays and the queue is ready to send your posting. Due to heavy traffic, posting may not be instantaneous. Since mid-December 2002, I have seen the time between customer payment and the paypal.com IPN being posted as long as 45 minutes. If the customer goes back to your store and starts shopping around again, their previous order number will be deleted before the paypal.com server makes its posting. Hence, the order will never get completed. Likewise, if you have your basket timeout set below that length of time, there will be no order for the paypal.com server to complete. You should make your basket timeout at least two hours. You should also include information in the paypal module's admin screen "Additional Instructions" (so the customer will see it at checkout) about transient delays before the order is finalized. Q: The orders show up in miva, but shipping charges are not included in the paypal payment. Shipping charges calculated by the shopping cart do not appear to be passed on to PayPal. A: If you view source at the order payment screen (the screen just before you are taken to paypal.com) you should see the shipping charge as a hidden input that is being passed to paypal.com. The problem is that you have not setup your profile at paypal.com correctly. Log into your account at paypal.com and click on the tab for Profile. Then click on Shipping Calculations. Per PayPal Technical Support Create a shipping method, and check the button for allowing transaction based shipping to override what you have in your profile. Click on continue, then click on save. Now your shipping charges passed from your cart will over ride what is listed in the profile. Frank I. PayPal Certified Developer PayPal Merchant Technical Support Note that you will need to do this for domestic and international shipping. Q: I'm having sudden problems with not receiving orders, though I receive notification from PayPal that I have received funds. In most cases, the email order notice finally comes through, though one today appears to be lost. In this case, PayPal reports it as order #1234. It is not in the list of orders under Order Processing. The number 1234 does not show up in the Show Basket either. I haven't made changes and everything has been working fine until now. A: The key is you have made no changes, some orders are getting into Merchant, and those that do get in, seem to be posting with long delays. Paypal.com is probably running show due to heavy traffic. This happens every year around Christmas time. When the customer returns to your store, the background IPN has not yet posted from paypal.com back to your store. There is a note to tell them not to worry about it; that it might take 30 minutes. But if they are the curious type and go to their basket and start changing things the order number that paypal got will be deleted. Hence, when the IPN finally does post, there is no order to complete. You should have your basket timeout set to 120 or higher. You can also put a note in the order payment screen message to be aware there may be delays in paypal.com notifying your store that a payment has been made during heavy shopping seasons. They should not be concerned and by all means, do not delete the items in the basket after the payment has been made. Q: I am seeing the following error when returning back to Miva Merchant after paying at paypal.com. Miva Merchant has encountered a fatal error and is unable to continue. The following information may assist you in determining the cause of the error: Error Code: OUI-00001 Description: Unknown Screen [XPROCCD] A: Scroll back up to the section "CIM Auxiliary System Extension module - ONLY Merchant version 4.14 and newer". If you see this error, this section applies to your store. It is likely you did not install AND ASSIGN the cim_aux.mvc to the store, as that is the error you would get if it is not assigned. Q: I am getting the following error message when return from paypal.com back to my store. Runtime error in Merchant2/paypal_1.mvc @ [00000000:00001990]: paypal_1.mv: Line 243: MvOPEN: Error opening 'Merchant2/,Merchant2/000001,1/orders.dbf': No such file or directory Fatal Error A: This is being caused by the fact that your PayPal account is using PDT (Payment Data Transfer). With PDT, additional parameters are appended to the return URL as PDT is used to customize your return page with payment information. As you are using IPN already, you are getting the same parameters passed via IPN that you would through PDT. You MUST turn PDT off in your PayPal Profile under 'Website Payment Preferences'. By doing so, you will eliminate the additional parameters that are being to the return URL. Q: I had a strange transaction. Apparently a customer canceled or didn't complete an order but was charged $.02 on their PayPal account. The item in their basket at the time cost $20+. Nothing on my website costs $.02. What is going on? A: They tried to hack your account and place a fake order. You correctly had the security settings set in paypal module to block order totals that did not match. If you had not, they would successfully placed an order for $20 while only paying 2 cents. Always make sure the security checks are turned on, i.e. that the order total in merchant matches the amount the customer pays at paypal.com and the email address for the store (recipient) is the same email address the money goes to. Also, you must always manually compare the order total in merchant with the amount paid at paypal.com. No telling if and when hackers will figure out a new exploit. Still have a question? |
|
Fig 1 Fig 2 Fig 3 |