1. Fabrik 3.8 has been released. As usual, we strongly recommend that you backup your site (using Akeeba) before upgrading. Report any issues in the forums, we will answer promptly.

Paypal form plugin

Mar 31, 2015
Paypal form plugin

  • Payment(top)


    Define the account to accept the payment, the payment type and currency.
    paypal-paymenht.png

    • Paypal email account - The email address registered with Paypal that will accept the payment
    • Or use an element - Alternatively select an element that will contain the Paypal account email
    • Payment type - If set to be a subscription all following subscription options need to be selected
    • Currency codeThree letter code stating the currency that the transaction will be billed in e.g. USD, GBP
    • Condition - Optional PHP code - if it returns false then the payment will not be run

    Price(top)

    Controls the price that your user will be paying.
    paypal-price.png
    • Cost - Enter a value of the transaction
    • Eval -Eval the cost field or not
    • Or select an element - Select an element that will contain the transaction value

    Item(top)

    Create information about the type of item/product the user is purchaising
    paypal-item.png
    • Purchase item - The name of the product being purchased
    • Eval - Eval the item field or not
    • Or select an element - Select an element that will contain the name of the item being purchased

    Shipping(top)

    paypal-shipping.png
    • Shipping cost - Set the shipping cost, can be a string or if eval = yes a php statement returning the shipping cost, can use placeholders
    • Eval - Should the shipping cost be parsed as a PHP statement
    • Shipping connection - the Fabrik connect containing the shipping table
    • Shipping Table - OPTIONAL - Select the table from which the user shipping data will be grabbed. If selected, please complete the following fields.
    • User ID - Select the field recording the User-Id in the table selected above. The logged on Joomla user ID will be used to look up shipping data.
    • First Name
    • Last Name
    • Last Name
    • Address 1
    • Address 2
    • ZIP - Postcode
    • State - Required for some countries, like the US
    • City
    • Country - Must be a valid ISO 3166-1 two letter code. See http://bit.ly/ipvTk
    • Address override - Optional. May causes errors on Paypal side depending on your Paypal settings.

    Subscription(top)


    paypal-subscription.png


    • Subscription connection - Optional - The Fabrik connection that contains the subscription table. Subscription settings are only required if you select this connection and table.
    • Subscription table - The Fabrik table that contains the subscription information
    • ID - The field that contains the subscription plan id. A record must exists where the ID field contains the same value as that of this plug-ins 'Purchase item' field
    • Name - The subscription plan's name, can use {placeholders}
    • Duration - The element that contains the duration of the subscription (must contain data that are integers)
    • Duration period - The element that contains the subscriptions duration period (must contain values such as D (for day) W (for week), M (for month), Y (for year)
    • Invoice Num - Optional - A placeholder, e.g. {myinvoice}. Put $_REQUEST['myinvoice'] = $whatever; in your IPN PHP file's createInvoice() method. If the placeholder is not found or left empty then a unique invoice id is generated
    • Recurring - Value should be 0 for non-recurring, 1 for recurring. Can use {placeholders}
    • Subscription switch - This is for sites where you can toggle between a subscription or a single payment. Should be some PHP code which returns true if you want the payment to be handled as a subscription. If left blank then the Payment type option will be used.
    Subscription switch example: Say you have a radio button on your form whose full name is 'payment__is_subscription', it has two options, values 0 / 1 and labels No /Yes
    Then in the 'Subscription switch' option code would be:

    PHP:

    return '{payment__is_subscription_raw}' == 1;
     

    IPN(top)


    paypal-ipn.png

    • IPN Custom Element - Optional - Select the element whose data will be updated when the transation has finished
    • IPN Custom Value - Optional - if you have selected an IPN Custom Element, enter the value that should be stored upon successful IPN. DO NOT USE : IN THIS FIELD! Use standard Fabrik {placeholders} for substitution before sending to PayPal. Use [name] as placeholders for PayPal IPN notify values (like [receiver_email], etc), subsitution happens during IPN notify phase. If left blank (but a Custom Element has been selected), the txn_id will be stored here.
    • IPN Txn-Id Element - Optional (but STRONGLY advised!) - element which will store the PayPal transaction ID
    • IPN Payment Element - Optional (but STRONGLY advised!) - element which stores the paymount_amount from the PayPal transaction
    • IPN Status Element - Optional (but STRONGLY advised!) - element which will store the PayPal transaction status
    • IPN Address Element - Optional (but STRONGLY advised!) - element which will store the PayPal buyer address and its status (confirmed or unconfirmed)
    • IPN PHP File - Select a PHP file to execute during the Paypal IPN phase. See scripts/paypal_ipn_example.php for details.

    Test mode(top)

    paypal-test.png
    • Test mode - If set to yes then the plug-in will post to the paypal sand box. Use this for testing
    • Seller account email - Your Paypal sandbox seller email address. Only used when test mode is on.
    • Receive debug emails - Receive the debug emails (sent for each IPN update)
    • Send default emails - Send the default emails to buyer (sent for each IPN update)
    • Test Site - OPTIONAL - you may provide a site address for the test PayPal IPN notify, which the script will use instead of your standard Joomla live site (if you have selected Test Mode above). This is useful if you are testing on a private host, with no external DNS entry.
    • Test QS - OPTIONAL - you may provide any &foo=bar query string args for testing, which the script will add to the IPN notify URL (if you have selected Test Mode above). This is useful for triggering remote xdebug, with whatever directive your PHP development environment uses (like &XDEBUG_SESSION_START=name)

    IPN logging(top)

    All IPN transactions are logged in the database table #__fabrik_logs.

    Additional infos(top)

    http://www.fabrikar.com/forums/index.php?threads/paypal-plugin-help-tutorial.33979/
    The PayPal plugin MUST be FIRST in the list of form plugins.

    Be careful about using redirect plugins in conjunction with a PayPal plugin, as redirecting will prevent PayPal form running. If you need to redirect after payment, use the PayPal plugin's built in redirection option, to which PayPal will redirect after payment. Only use a redirect plugin if you have conditions which dictate which one will run.

    Here is a quick overview screencast of a simple PayPal setup:

    http://screencast.com/t/aiyqaQTC3d

    ... taken from this thread, which has some other useful information ...

    http://fabrikar.com/forums/index.php?threads/paypal-form-plugin-and-ipn.40934/#post-206204
  • Loading...