NOTE: Archived on Oct 6, 2021
Nothing here is ready for prime-time yet.
- This Elixir app only needs to be set up once to handle multiple PayPal sandboxes and multiple development machines.
- PayPal IPNs received while the target development machine is unavailable are responded to with a success response by this app. The resulting IPN record is (not) queued.
If you have the following resources, then this project may be useful to you:
- A publicly-facing server that can host this project's Elixir program1. Both your PayPal sandbox and development computer must be able to perform HTTP requests against this server.
The developer's computer must be able to host Elixir at the same revision level as for the server.
You will need the identifiers for your PayPal sandboxes and your corresponding development computers as follows:
For this, you can use the Secure Merchant Id
located which can be found in the PayPal sandbox. In the
profile tab, it is the second item which is presented.
For this, the developer's email is used in order to deliver some notifications and identify the developer.
To Do
In each PayPal sandbox, configure the server's URL for PayPal to send the IPN messages to.
PayPal's guide describes how to do this in section 3 on page 23.
This consists of installing the router gem and creating two aliases so that the developer does not have to find the id of the Sandbox every time that they run the gem.
The aliases should be saved in a bash config file (or equivalent) using:
alias paypal_testing_on='ruby start_paypal sandbox_id developer_id'
alias paypal_testing_off='ruby stop_paypal sandbox)id developer_id'
where sandbox_id
is the id of the sandbox that the developer will be using
and developer_id
is the email of the developer.
To start the router:
paypal_testing_on
To stop:
stop
If you inadvertently control-c
out of the terminal window, that will not stop the process.
In this case, in another terminal you can stop the router process by:
paypal_testing_off
TODO
TODO
When you set up recurring payments on PayPal, PayPal will start sending IPN notifications to you whenever it deems necessary. This will happen, among other activities, when it notifies you that it charged a credit card or that someone issued a refund on the PayPal sandbox side.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request