[12019] | 1 | Support for PayPal(tm) Payments |
---|
| 2 | ******************************* |
---|
| 3 | |
---|
| 4 | Ikoba generally supports paying things via PayPal. For this, we use |
---|
| 5 | the REST-API provided by PayPal. |
---|
| 6 | |
---|
| 7 | To make that work, you have to (1) obtain app credentials from PayPal |
---|
| 8 | and (2) make that credentials known to ikoba. |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | Getting Credentials from PayPal |
---|
| 12 | +++++++++++++++++++++++++++++++ |
---|
| 13 | |
---|
| 14 | 1) Create a general PayPal account |
---|
| 15 | |
---|
| 16 | Browse https://www.paypal.com and create a new account. If you plan |
---|
| 17 | to provide services or goods payed via PayPal. you should of course |
---|
| 18 | create a business account. You can, however, start with a personal |
---|
| 19 | account as it is upgradeable at a later point in time. |
---|
| 20 | |
---|
| 21 | For only testing ikoba PayPal support, a personal account is |
---|
| 22 | sufficient. |
---|
| 23 | |
---|
| 24 | 2) Register as a developer at PayPal |
---|
| 25 | |
---|
| 26 | Go to https://developer.paypal.com and log in with the credentials |
---|
| 27 | obtained in step 1. This will create some fake users/merchants for |
---|
| 28 | you, which are *not* suitable for use with the PayPal REST API. |
---|
| 29 | |
---|
| 30 | 3) Create a REST-API compatible application |
---|
| 31 | |
---|
| 32 | After logging in on https://developer.paypal.com/ go to the |
---|
| 33 | dashboard and create a new app by clicking the respective button. |
---|
| 34 | |
---|
| 35 | Afterwards, in the developer dashboard under "My apps" you can find |
---|
| 36 | your new set of client IDs and secrets for both, sandbox and live use. |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | Setting PayPal Client ID, secret, etc. |
---|
| 40 | ++++++++++++++++++++++++++++++++++++++ |
---|
| 41 | |
---|
| 42 | To make the credentials known to Ikoba, put them into configuration |
---|
| 43 | files like this:: |
---|
| 44 | |
---|
| 45 | # paypal.conf |
---|
| 46 | |
---|
| 47 | [rest-client] |
---|
| 48 | id = <YOUR-VERY-OWN-PAYPAL-REST-CLIENT-ID> |
---|
| 49 | secret = <YOUR-VERY-OWN-PAYPAL-REST-CLIENT-SECRET> |
---|
| 50 | # valid values: sandbox, live |
---|
| 51 | mode = sandbox |
---|
| 52 | |
---|
| 53 | Out of the box, we expect these files to be in the following _two_ |
---|
| 54 | locations: |
---|
| 55 | |
---|
| 56 | path/to/ikoba/install/etc/paypal.conf |
---|
| 57 | path/to/ikoba/install/etc/paypal-testing.conf |
---|
| 58 | |
---|
[12031] | 59 | Obviously, the second file is used for (automated) testing. |
---|
| 60 | |
---|
| 61 | .. note:: As these credentials are bound to |
---|
| 62 | persons/companies/organisations, we do not share them via |
---|
| 63 | version control. |
---|
| 64 | |
---|
| 65 | For developers: The credentials given via ZCML and config files are |
---|
| 66 | used on startup to initialize the PayPal SDK. Therefore, it should not |
---|
| 67 | be neccessary to care for the credentials when creating Payment |
---|
| 68 | objects after the Grok instance started. |
---|