Subsciption PayPal Payment
Copyright © 2001, William Weiland
Overview
The purpose of this module is to allow customers to place a subscription order at a Miva Merchant © Miva Corp. enabled store which they will then pay for using their PayPal © x.com account.
Initial Setup
Use the Merchant admin upload feature to upload the paypals.mv (paypals.mvc compiled) module. Once uploaded, click the Add button to add it to the mall/domain.

If you are updating an existing module, click Modules, then the link to the module, then the file upload feature, overwriting and updating the older version.

In admin, under your store, click on the link for Payment Configuration. Assign the module and Update it to install it in your store.

Click the link for Subscription Payment via PayPal to enter the configuration settings.

For compiled Merchant only: Through admin, upload the file cim_aux.mvc (CIM Auxiliary System Extension). Install it as a system extension module in your store. No configuration settings are needed for this module other than to Assign it to the store. This requirement does not apply to uncompiled Miva Merchant stores, version 4.13 and older.

FTP the paypal_1.mv, paypal_2.mv and paypal_3.mv (paypal_1.mvc, paypal_2.mvc and paypal_3.mvc compiled) to the Merchant root directory, eg Merchant2/ This is the same directory that your merchant.mv (merchant.mvc compiled) 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.

Compiled version (Merchant 4.14 and newer) only. If you are upgrading from a previous version of our paypal module and the version you are upgrading is dated Nov 11, 2003 or newer, be sure you upgrade all of the files in the paypal.zip file. The modules paypals.mvc and cim_aux.mvc are updated through admin:modules:name of the module, upload, then UPDATE. The paypal_1.mvc, paypal_2.mvc and paypal_3.mvc are FTPd to the /Merchant2/ directory, replacing the previous files of the same name.


Configuration Settings
Enter data into the applicable input fields.

Merchant Script Name
In most cases this is merchant.mv (merchant.mvc compiled) However, some people have changed this to things like catalog.mv, store.mv, etc. Use the current name of your store. Do not include the full URL.

PayPal ID
PayPal accounts are based on your email address. You should have already established your PayPal account before installing this module so that you will know the ID and type of account beforehand. Then enter the email address which you are using to accept funds through PayPal.

URL to PayPal
This is a fixed URL. However, PayPal at a later date, may change this URL. For this reason, you have the option to make the change yourself without having to get an updated version of this module. If your paypal module is defaulted to https://secure.paypal.com/cgi-bin/webscr, change it to https://www.paypal.com/cgi-bin/webscr

Conversion Rate from USD ($)
If your store is based on US dollars, this value should be 1. If your store is in other than US currency, the totals from the sale need to be converted to US dollars in order to insert the correct amounts into the PayPal screen. This rate will probably be the same as that rate you are using with the Euro Currency Module in Merchant. Whenever, the conversion rate changes you will need to edit this field in admin.

Your Store Logo URL
You will need to determine which logo you are going to use, copy it to your web site (in a virtual path below Merchant), then enter the virtual path to that logo. The logo must be 150 X 50 pixels.

Payment Method Prompt
Normally this will be PayPal Subscription. However, you may wish to change that to Subscription Payment via PayPal, Subscription PayPal Web Accept, etc.

Additional Instructions
This message appears on the Order Payment screen. It allows you to inform the customer what the payment process consists of at the PayPal site and that they need to continue through all of the screens to return to your store to display the invoice screen.

Instant Payment Notification (IPN)
PayPal will post notification of payment into a special payment log in your Merchant store on your site before the customer even returns to your store's invoice screen. It will not contain credit card details, but will give you info about the transaction. This file is for information only and should not be considered a verification. The verification can be made from a link to PayPal in the admin screen in the Order Edit section. See the admin:payment configuration screen on other details necessary to implement. This is a required step.

Subscription Payment Terms
Rather than rehashing the information at the PayPal site regarding the information which is used in these inputs, please read your PayPal help screens under Subscription Payments.


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.

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.

<MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.ok" VALUE = "{ Module_Find_ID( Orders.d.pay_id ) }">
<MvIF EXPR = "{Modules.d.code EQ 'paypals'}">
<MvEVAL EXPR = "{ asciichar( 10 ) $ 'Payment method: ' $ Modules.d.name }">
</MvIF>

If you are using compiled Miva Merchant, you will need to re-compile the meremail.mv into meremail.mvc.


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 is not being refreshed periodically.