FMStudio PayPal Module

From FMWebschool Reference

Jump to: navigation, search

The FMStudio PayPal Module allows FMStudio users to create powerful dynamic PayPal objects from FMStudio recordsets. Features such as Buy Now buttons, full shopping carts, and payment notifications are easily accessible using this module.

Contents

Version History

Version 1.0.0 (January 29, 2008)

  • Google PayPal module released with support for both buy now, cart, and notification

Version 2.0.0 (October 15, 2009)

  • Added FMStudio Pro compatibility to the module

Quick Tutorial

PayPal Buy Now

The PayPal Buy Now server behavior sends a single item for purchase with PayPal.

PayPal Cart

The PayPal Cart server behavior allows you to send a number of items with their prices and quantities to PayPal in order to create a multi item checkout payment.

PayPal Notify

The PayPal Notify server behavior allows you to take in a PayPal notify request (as specified by the Notify URL setting in PayPal Buy Now or PayPal Cart) and use it to update a specific record in your database.

  • Create a new blank PHP FileMaker page
  • Add the PayPal Notify Server Behavior (Server Behaviors -> Modules -> PayPal)
  • Select the database and layout that contain the record to update
  • Input your business email (PayPal receiving email)
  • Select the field that represents the invoice (an exact match will be used on this field to find the record for editing)
  • Next select 3 fields reserved in your DB for PayPal: order status, PayPal fields, and PayPal values
    • Those fields will receive some raw PayPal data and update your record with it

User Guide

PayPal Buy Now

1. Positioning within the Page

You should place your cursor within the page in the location where the buy now button should appear. Placement must be outside any HTML forms.

2. Common Options

  • Business Email: the PayPal email that will receive the payment
  • Item Number: The item number (optional)
  • Item Name: The item name
  • Price: The item price (will be multiplied by quantity below)
  • Quantity: The quantity of items to purchase
  • Total Shipping: The total shipping for this whole order (will not be multiplied by the quantity above)
  • Total Tax: The total tax amount for the whole order
  • Invoice Number: Optional invoice number to track it if the Notify feature is used (see the PayPal Notify section for details on using this feature)
  • Return URL: The full URL (http:// included) of the page that the user should be taken to after a successful purchase
  • Notify URL: Optional full URL (http:// included) of the page that the PayPal server should notify after a successful purchase (see the PayPal Notify section for details on using this feature)
  • Sandbox Mode: The target system for the payment, when developing PayPal systems you should get a free PayPal Sandbox account at [1]

3. Extra Settings

  • Currency Code: Optional 3 letter currency code for all the amounts within the transaction
  • Cancel URL: The URL where the user can go to if they decide not to go through with the transaction

PayPal Cart

1. Positioning within the Page

You should place your cursor within the page in the location where the PayPal logo should appear. Placement must be outside any HTML forms.

2. Common Options

  • Recordset: the recordset that contains each item of the cart as a separate record
  • Business Email: the PayPal email that will receive the payment
  • Item Number: The field that contains the item number (optional)
  • Item Name: The field that contains the item name
  • Price: The field that contains item price (will be multiplied by quantity below)
  • Quantity: The field that contains the quantity of items to purchase
  • Tax: The field that contains the tax amount for this cart item (optional)
  • Total Shipping: The total shipping for this whole order
  • Invoice Number: Optional invoice number. Required if the PayPal Notify feature is used (see the PayPal Notify section for details on using this feature)
  • Return URL: The full URL (http:// included) of the page that the user should be taken to after a successful purchase
  • Return URL: Optional full URL (http:// included) of the page that the PayPal server should notify after a successful purchase (see the PayPal Notify section for details on using this feature)
  • Sandbox Mode: The target system for the payment, when developing PayPal systems you should get a free PayPal Sandbox account at [2]

3. Extra Settings

  • Currency Code: Optional 3 letter currency code for all the amounts within the transaction
  • Cancel URL: The URL where the user can go to if they decide not to go through with the transaction


PayPal Cart

The PayPal Cart notify server behavior is meant for a page that acts as the PayPal Notify URL and accepts messages from the PayPal server. When a message is received its authenticity is checked and then a record in your database is updated with the transaction details.

1. Positioning within the Page

The code will be placed above the HTML tag automatically.

2. Common Options

  • Connection: the connection to use in order to connect to your database. This cannot be a login based connection since the PayPal server will not be performing logins when submitting data to this page.
  • Layout: the layout that contains the order record to update
  • Business Email: the PayPal email that received the payment, this is asked for security purposes to verify that the notification payment went to your business.
  • Invoice Number: The field that contains the invoice number that was passed to PayPal in the actual order, this is used to find the record in your selected layout and then update it. It must perfectly match the invoice number sent with the order to PayPal.
  • Payment Status: The field to write the PayPal payment status into (such as "Completed" or "Pending")
  • Data Fields: The field to write a new line separated list of variable field names from PayPal for this transaction
  • Data Values: The field to write a new line separated list of variable values from PayPal for this transaction
  • Run Script: An optional script to run after the record edit, often used to convert the variable list into a portal (see the Shopping Cart webinar movie and sample files in the external links section for details on this script)
  • Sandbox Mode: The target system for the payment, when developing PayPal systems you should get a free PayPal Sandbox account at [3]

External Links

Personal tools