Payments support
From EFrontWiki
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
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
4. In the configuration panel you must fill your PayPal business address. This is the account to which all payments will be transfered.
- 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:
- Log in to your Business or Premier Account.
- Click the Profile sub-tab.
- In the Selling Preferences column, click the Instant Payment Notification Preferences link.
- Click the Edit button.
- Select the checkbox to activate IPN.
- 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
- 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.
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.
- 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”.
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.
[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
- A student payment triggers IPN. If the payment has a “Pending” status, you receive another IPN when the payment clears, fails, or is denied.
- 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.
- 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_status | Canceled_Reversal
Completed | 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. |
| 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_status | verified 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_type | echeck 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. |
| 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_gross | Transaction-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 |
| shipping | Transaction-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 |
[edit] Currencies Allowed
Administrators can use the following currencies.








