- The client id and client secret parameters. They are necessary for the authentication.
- The host of the Paypal environment. In case of sandbox, it supposed to be
https://api-m.sandbox.paypal.com
, the live supposed to behttps://api-m.paypal.com
. - The initial start date and limit parameters for the transaction search API.
- The request limit, that is the maximum number of transaction search API calls for one import iteration.
- The payment method that will be used as the payment method of the contribution.
- The financial type that will be used as the financial type of the contribution.
- The optional tag that will be added to the contributor contact.
- The optional group that will receive the contributor contact.
- Start, stop or verify checkbox for changing the state of the importer application.
- The current state of the application is always visible on the top box.
- The stats of the last import iteration is also always visible (If we have any stats).
- The soft issues of the last iteration is also visible if we have any. Soft issues are the ones that doesn't block the import process. Eg: for some reason we can't add the tag to the contact.
- On case of error state, the cause of the error is shown on the state box.
The importer application is state based. The state manages the behaviour of the import process. The following states are defined:
do-nothing
is the initial state. In this state the import process does nothing. On the admin form, You can push back the process to this state from any other states.import-init
state is followed by thedo-nothing
state. In this state the import process pushes the state toimport
and starts the transaction search from the initial start date.import
state is followed by theimpost-init
state. In this state it maintains internal parameters for the transaction search API calls. If the end time of the search is in the future, it pushes the state tosync
.sync
state is followed by theimport
state. This state behaves exactly the same as theimport
state.error
state could be set if the communication to the Paypal API fails. It means the application could enter this error state from theimport
and thesync
states. On the admin form, you have to push the state back todo-nothing
from this state. In this state the import process does nothing.
The import process stores some information about the problems of the last import iteration.
But sometimes we might need to know the details of the import issues of the previous iterations also.
This tool uses Civi::log
for file logging. The missing emails are logged out as info, the CRM related exceptions are logged out as errors.
The lines are prefixed with the Paypal-Importer |
string. The prefix is followed by the transaction id |
and the message of issue.