Payments support

From EFrontWiki

 Note : This function is available in Enterprise and Educational 3.5.5 versions and in the Community++,
Enterprise and Educational version 3.6 of eFront.

eFront Educational integrates payments support. This payment infrastructure communicates with paypal and collects money for sold Lessons/Courses.

Contents

[edit] Configuration

The configuration includes two parts, the eFront configuration and the paypal configuration.

  • eFront Configuration:

1. Login as administrator
2. From the control center, select the Paypal option

Paypal option
Paypal option

This page shows the transactions that have been made so far in two different tabs in order to be better handled (it will be described in a following section).
3. At the top and left of the page there is a link “PayPal configuration panel” where you can configure eFront for PayPal payments

Paypal configuration panel
Paypal configuration panel

4. In the configuration panel you must fill your PayPal business address. This is the account to which all payments will be transfered.

Paypal business address
Paypal business address
  • Paypal Configuration:

The administrator has to enable the IPN in his PayPal account. He can activate IPN for his PayPal account through his account profile. When you activate IPN through your account profile, the notification URL that you specify is used for all your IPNs. You can override the value on specific payment transactions by including notification URLs in the programming code that your website sends to PayPal when people pay you.
To activate IPN through your account profile:

  1. Log in to your Business or Premier Account.
  2. Click the Profile sub-tab.
  3. In the Selling Preferences column, click the Instant Payment Notification Preferences link.
  4. Click the Edit button.
  5. Select the checkbox to activate IPN.
  6. In the Notification URL text box, enter the URL that will receive and process IPNs. In this occasion the URL is something like: http://your-eFront.com/ipn.php
  7. Click the Save button.

[edit] Transactions Handling

Assume that a user has selected a few items and they have been added to his shopping basket. If these items have a price (an item may not have a price which makes it a free item by default) then the user proceeds and makes a payment through PayPal. Prior sending the user to PayPal the transaction is being tracked (labeled as not-finished) and can be viewed from eFront’s administrator menu in the main PayPal screen.

  • Finished Transactions

If this payment is successful then on the background with the use of the IPN (Instant Payment Notification) technique, the student is being registered in the items that he had selected before. If he follows the return address that PayPal provides he can see a message about the successful transaction (note that this is not a necessary action in order to be registered for the selected items because this was made with the IPN). Info about this transaction is available from the administrator in the main PayPal screen (Figure 6) and the tab with title “Finished” as it has changed status.

Finished transactions
Finished transactions

we can see some Finished transactions. The administrator can see at a glance some basic information about these transactions and in the last column he can see in detail all the variables that have been transferred through PayPal.

Transaction details
Transaction details
  • Not finished Transactions

If the payment was not successful then there was a problem such as:
- The student had not made any payment, or
- The student had problems with the data transferred through PayPal, or
- There was a problem with the student’s card etc.
In such an occasion the transaction remains “Not-Finished” and the administrator can view it in the main PayPal screen under the tab with the title “Not-Finished”.

Not Finished transactions
Not Finished transactions

The administrator can see at a glance some basic information about these transactions or a detailed report with all transaction-related information. A detailed description of these variables is available in the last section.

Transaction details
Transaction details

[edit] How IPN works

Instant Payment Notification is a mechanism by which your eFront system receives the transaction data. IPN posts individual transaction information to a URL on your eFront system that you have programmed to process this incoming data. To use IPN, you must activate it, because it is disabled by default in the administrator’s Paypal account. In the eFront system IPN is the default way in order to register a student for the lessons or/and seminars that he has selected so the activation of IPN in the administrator’s Paypal account its inevitable.
If IPN is activated, you receive a notification from Paypal in the following cases:
- When a payment is first sent, indicating that the status of the payment is Completed or Pending
- When a payment clears, fails, or is denied, if the status was pending
In other words when Instant Payment Notification is activated, you will receive an IPN when a payment is first sent, which will state the status of the payment: Completed or Pending and when the payment is Pending, you will receive another IPN when the payment clears, fails, or is denied. All these IPN handles are controlled by your eFront system automatically. Figure 10 illustrates the IPN steps that ensures that PayPal and eFront are synchronized on the status of the transaction

IPN steps
  1. A student payment triggers IPN. If the payment has a “Pending” status, you receive another IPN when the payment clears, fails, or is denied.
  2. PayPal posts HTML FORM variables to a program at a URL you specify. You can specify this URL either in your account profile or this can be done by the eFront system where the URL is being configured in the installation process. This post is the heart of IPN. Included in the notification is the student’s payment information (such as student name, payment amount). All possible variables in IPN posts are detailed in the next sections. When your eFront system receives a notification, it process the incoming data in order to register or not a student to the selected lessons or/and seminars.
  3. Your eFront system then validates the notification to ensure that it is legitimate.

Because credit card and bank information is not transmitted in Instant Payment Notification (IPN), PayPal does not require Secure Sockets Layer (SSL) to encrypt IPN transmissions.

[edit] Transaction Variables

In the detailed transactions screen there are various variables that describe this transaction.

Variable Possible Values Description
id The id of the transaction in the eFront system
mc_gross Full amount of the customer's payment, before transaction fee is subtracted. Equivalent to payment_gross for USD payments. If this amount is negative, it signifies a refund or reversal, and either of those payment statuses can be for the full or partial amount of the original transaction.
settle_amount Price of the items
address_status confirmed unconfirmed Student provided a confirmed address

Student provided an unconfirmed address.

payer_id
tax Transaction-based tax override variable. Set this to a flat tax amount to apply to the transaction regardless of the administrator’s location. This value overrides any tax settings set in your PayPal account profile.
address_street Student’s street address.
payment_date Time/Date stamp generated by PayPal, in the following format: HH:MM:SS DD Mmm YY, YYYY PST
payment_statusCanceled_Reversal

Completed
Denied
Expired
Failed
Pending
Refunded
Reversed
Processed
Voided

Canceled_Reversal: A reversal has been canceled. For example, you won a dispute with the customer, and the funds for the transaction that was reversed have been returned to you.

Completed: The payment has been completed, and the funds have been added successfully to your account balance.
Denied: You denied the payment. This happens only if the payment was previously pending because of possible reasons described for the Pending Reason element.
Expired: This authorization has expired and cannot be captured.
Failed: The payment has failed. This happens only if the payment was made from your customer’s bank account.
Pending: The payment is pending. See pending reason for more information.
Refunded: You refunded the payment.
Reversed: A payment was reversed due to a chargeback or other type of reversal. The funds have been removed from your account balance and returned to the buyer. The reason for the reversal is specified in the ReasonCode element.
Processed: A payment has been accepted.
Voided: This authorization has been voided.

charset The charset in which the transaction was made
address_zip Zip code of customer’s address
first_name Customer’s first name
mc_fee Transaction fee associated with the payment. mc_gross minus mc_fee equals the amount deposited into the receiver_email account. Equivalent to payment_fee for USD payments. If this amount is negative, it signifies a refund or reversal, and either of those payment statuses can be for the full or partial amount of the original transaction fee.
address_country_code Two-character ISO 3166 country code
exchange_rate Exchange rate used if a currency conversion occurred
address_name Name used with address
notify_version The value of the notify_version variable is the version number of Instant Payment

Notification that makes the post.

settle_currency The currency of the payment. Defines the currency in which the monetary variables (amount, shipping, shipping2, handling, tax) are denoted
custom The transaction Code in order to prevent payment injections
payer_statusverified
unverified
Customer has a Verified PayPal account.

Customer has an Unverified PayPal account.

business Email address for your PayPal account
address_country Country of student’s address
address_city City of student’s address
quantity Quantity as entered by the student or as passed by you, the eFront. If this is a shopping cart transaction, PayPal appends the number of the item (e.g. quantity1, quantity2)
verify_sign The value of verify_sign is an encrypted string used to validate the authenticity of the

transaction

payer_email Customer’s primary email address. Use this email to provide any Credits
txn_id A unique transaction ID generated by PayPal
payment_typeecheck
instant
echeck: This payment was funded with an eCheck.

instant: This payment was funded with PayPal balance, credit card, or Instant Transfer

last_name Customer’s last name
address_state State of customer’s address
receiver_email Primary email address of the payment recipient (that is, the merchant). If the payment is sent to a non-primary email address on your PayPal account, the receiver_email is still your

primary email.

payment_fee Transaction-specific For USD payments only USD transaction fee associated with the payment.

payment_gross minus payment_fee equals the amount deposited into the receiver email account. Is empty for non-USD payments. If this amount is negative, it signifies a refund or reversal, and either of those payment statuses can be for the full or partial amount of the original transaction fee.

receiver_id Unique account ID of the payment recipient (i.e., the merchant). This is the same as the recipient's referral ID
txn_type cart
express_checkout
send_money
virtual_terminal
web-accept
cart: Transaction created by a customer:

• Via the PayPal Shopping Cart feature.
• Via Express Checkout when the cart contains multiple items.
express_checkout: Transaction created by Express Checkout when the customer’s cart contains a single item.
send-money: Transaction created by customer from the Send Money tab on the PayPal website.
virtual_terminal: Transaction created with Virtual Terminal.
web-accept: Transaction created by customer via Buy Now, Donation, or Auction Smart Logos

item_name Item name as passed by eFront. If this is a shopping cart transaction, PayPal will append the number of the item (e.g., item_name_1, item_name_2, and so forth)
mc_currency
item_number Pass-through variable for you to track purchases. It will get passed back to you at the completion of the payment. If omitted, no variable will be passed back to you
residence_country Two-character ISO 3166 country code
test_ipn The purpose of test_ipn is to provide testing programs a means to differentiate between Sandbox IPN and live IPN
payment_grossTransaction-specific For USD payments only Full USD amount of the customer’s payment, before transaction fee is subtracted. Will be empty for non-USD payments. This is a legacy field replaced by mc_gross. If this amount is negative, it signifies a refund or reversal, and either of those payment statuses can be for the full or partial amount of the original transaction
shippingTransaction-specific Shipping charges associated with this transaction.
Format: unsigned, no currency symbol, two decimal places
status submitted
completed
invalid-data
invalid-ipn
wrong-transaction-id
other
submitted: student has filled his cart and goes to PayPal website

completed: student has completed his payment through PayPal successfully
invalid-data: the date that has been sent from eFront to PayPal was invalid
invalid-ipn: the data that was send from PayPal to eFront was invalid
wrong-transaction-id: the transaction id of paypal or the transaction id of eFront was wrong during the IPN POST
other: here can be any other value from payment_status

[edit] Currencies Allowed

Administrators can use the following currencies.

currencies allowed