Called by the payment provider to confirm a payment. Validates the submitted data updates the status of the donation and triggers the confirmation mail. Callbacks concerning failed transactions are currectly being ignored, but a log entry should probably be added to the data set.
The submitted data is validated against the data set using the primary key, utoken, and donation amount. The status is updated only if the three values match, otherwise the handler responds with an error message. An additional requirement is to determine the credit card's expiration date by using the payment provider's API.
GET request
URL: https://test.wikimedia.de/spenden/mcp-handler.php
Request model parameters:
- function (billing for successful transactions; error for failed transactions)
- amount (in cents)
- auth (16B; hex representation)
- customerId (20B; hex representation; only set on function=billing)
- sessionId (20B; hex representation; only set on function=billing)
- transactionId (e. g. spenden.wikimedia.de-IDv5mgzw10kp)
- utoken (20B; hex representation; created when adding the donation data set and passed to the payment provider)
- donation_id (primary key of the donation data set)
- errorcode (as defined in techdoc.micropayment.de; only on function=error)
- errormessage (as defined in techdoc.micropayment.de; only on function=error)
- title (transaction description as printed on the invoice)
- country (ISO 3166-1 alpha-2)
- currency (ISO 4217)
- token
- testmode
The serialized data array in the data set is being updated with the passed values. The values are mapped to different keys, though:
Values that are being stored for documentation purpose only:
- currency => mcp_currency
- amount => mcp_amount
- country => mcp_country
- auth => mcp_auth
- title => mcp_title
- sessionId => mcp_sessionid
Values that are being stored for later export:
- transactionId => ext_payment_id
- function => ext_payment_type
- status => ext_payment_status
- customerId => ext_payment_account
- mcp_cc_expiry_date (needs to be determined by requesting the payment provider's API)
- ext_payment_timestamp (generated at runtime)