My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _IPNServer_IPNServer_h_
#define _IPNServer_IPNServer_h_

#include <Web/SSL/SSL.h>

NAMESPACE_UPP

class IPNServer : public ScgiServer
{
private:

void OnAccepted();
void OnRequest();
void OnClosed();

String payServer;
int payPort;

// 'VERIFIED' answer handler
Callback1<VectorMap<String, String> >onVerified;

// 'INVALID' answer handler
Callback onInvalid;

public:

// constructor - defaults to port 8787
IPNServer(int port = 8787);

// setup server and port for back confirmation message
IPNServer &SetPayServer(String const &s) { payServer = s; return *this; }
IPNServer &SetPayPort(int p) { payPort = p; return *this; }

// setting of handler
IPNServer &SetVerifiedHandler(Callback1<VectorMap<String, String> >handler) { onVerified = handler; return *this; }
IPNServer &SetInvalidHandler(Callback handler) { onInvalid = handler; return *this; }

// runs the server
void Run(void);

};

END_UPP_NAMESPACE

#endif

Change log

r4584 by micio on Feb 13, 2012   Diff
Bazaar/IPNServer : an SCGI-based server
for PayPal Instant Payement Notification
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 962 bytes, 45 lines
Powered by Google Project Hosting