Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base: cb828ee623
...
compare: f7540fdf74
  • 2 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
71 README.markdown
View
@@ -16,37 +16,22 @@ Feel free to fork this project and improve it. I'd love to see some cooperation
Getting started
===============
-Configure your personal AppEngine settings
-----------------------------
-
-You have to replace the application and version in war/src/main/webapp/WEB-INF/appengine-web.xml with your own before deploying.
-
-
-Configure your Appengine SDK
-----------------------------
-
-in .m2/settings.xml:
-
- <settings>
- <profiles>
- <profile>
- <id>gae-config</id>
- <properties>
- <gae.home>C:\Java\lib\appengine-java-sdk-1.5.4</gae.home>
- </properties>
- </profile>
- </profiles>
- <activeProfiles>
- <activeProfile>gae-config</activeProfile>
- </activeProfiles>
- </settings>
-
Build and run the example application
-------------------------------------
1. `mvn clean install`
2. `cd war`
-3. `mvn gae:run`
+3. `mvn appengine:devserver`
+
+
+History
+=======
+
+0.0.2-SNAPSHOT
+--------------
+
+Upgrade to Vaadin 7 and AppEngine 1.8.
+*important* The Maven AppEngine plugin is now the one officially supported by Google. The plugin requires Maven 3.1.0 or higher, so you may need to upgrade Maven.
Using the Library in Your Own Projects
@@ -104,7 +89,7 @@ Adding the Servlets
To process PayPal IPN messages, the task queue is used. This allows for easy and configurable retries. To properly process IPN messages
you will need three servlets. Two are part of this packages, one you will need to implement yourself.
-The IPNServlet stores incoming IPN messages as is and forwards them to the IPNValidationServlet through a task queue.
+The *IPNServlet* stores incoming IPN messages as is and forwards them to the IPNValidationServlet through a task queue.
<servlet>
<servlet-name>IPNServlet</servlet-name>
@@ -115,7 +100,7 @@ The IPNServlet stores incoming IPN messages as is and forwards them to the IPNVa
<url-pattern>/ipn</url-pattern>
</servlet-mapping>
-The IPNValidationServlet tries to validate the message. The number and frequency of retries is configured in the queue. After successful
+The *IPNValidationServlet* tries to validate the message. The number and frequency of retries is configured in the queue. After successful
validation, the servlet starts the processing task.
<servlet>
@@ -132,7 +117,7 @@ validation, the servlet starts the processing task.
<url-pattern>/ipn/validate</url-pattern>
</servlet-mapping>
-The processing servlet should be implemented by you. To get you started, this project contains a dummy servlet.
+The *processing servlet* should be implemented by you. To get you started, this project contains a dummy servlet.
<servlet>
<servlet-name>IPNProcessingServlet</servlet-name>
@@ -142,24 +127,10 @@ The processing servlet should be implemented by you. To get you started, this pr
<servlet-name>IPNProcessingServlet</servlet-name>
<url-pattern>/ipn/process</url-pattern>
</servlet-mapping>
-
-
-Maven repository
-================
-
-The current snapshot is hosted on Sonatype's snapshot repository, so if you just want to use the project add this to your pom.xml:
-
- <repositories>
- <repository>
- <id>sonatype-snapshots</id>
- <name>Sonatype Open Source snapshot repository (for POW and MailJimp)</name>
- <url>https://oss.sonatype.org/content/groups/public/</url>
- </repository>
- </repositories>
- <dependencies>
- <dependency>
- <groupId>com.pow.paypal</groupId>
- <artifactId>pow-paypal-core</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </dependency>
- </dependencies>
+
+
+ Maven Repository
+ ================
+
+ Currently this project is not released or deployed to a public repository. Please let me know if you'd like that.
+
23 core/pom.xml
View
@@ -3,13 +3,12 @@
<parent>
<groupId>com.pow.paypal</groupId>
<artifactId>pow-paypal</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>0.0.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.pow.paypal</groupId>
<artifactId>pow-paypal-core</artifactId>
- <version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Powered by Reindeer PayPal core</name>
<description>Powered by Reindeer is a high-level application framework integrating
@@ -59,11 +58,21 @@
<version>1.1</version>
</dependency>
- <dependency>
- <groupId>com.vaadin</groupId>
- <artifactId>vaadin</artifactId>
- <version>${vaadin.version}</version>
- </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-server</artifactId>
+ <version>${vaadin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-client-compiled</artifactId>
+ <version>${vaadin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-themes</artifactId>
+ <version>${vaadin.version}</version>
+ </dependency>
<dependency>
<groupId>com.googlecode.objectify</groupId>
31 .../com/streamhead/gae/paypal/PayPalApplication.java → ...om/streamhead/gae/paypal/PayPalApplicationUI.java
View
@@ -20,28 +20,31 @@
import com.googlecode.objectify.ObjectifyService;
import com.googlecode.objectify.Query;
import com.streamhead.gae.paypal.ipn.IPNMessage;
-import com.vaadin.Application;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
+import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
import com.vaadin.ui.Table;
-import com.vaadin.ui.Window;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
-public class PayPalApplication extends Application {
+public class PayPalApplicationUI extends UI {
private static final long serialVersionUID = 1L;
protected static final PayPalEnvironment environment = PayPalEnvironment.SANDBOX;
Table ipnTable = new Table("IPN messages");
- Label ipnDetail = new Label("Select message for detail", Label.CONTENT_PREFORMATTED);
+ Label ipnDetail = new Label("Select message for detail", ContentMode.PREFORMATTED);
- public Window buildMainLayout() {
- Window mainWindow = new Window("PayPal Test Application");
+ public Component buildMainView() {
+ VerticalLayout layout = new VerticalLayout();
- mainWindow.addComponent(new Label("Environment: " + environment));
+ layout.addComponent(new Label("Environment: " + environment));
ipnTable.setSizeFull();
ipnTable.setSelectable(true);
@@ -49,7 +52,7 @@ public Window buildMainLayout() {
ipnTable.addContainerProperty("Date", Date.class, null);
ipnTable.addContainerProperty("Validated", Boolean.class, Boolean.FALSE);
ipnTable.addContainerProperty("Transaction Type", String.class, "");
- ipnTable.addListener(new ValueChangeListener() {
+ ipnTable.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
@@ -58,11 +61,11 @@ public void valueChange(ValueChangeEvent event) {
ipnDetail.setValue(msg.getFullMessage().getValue());
}
});
- mainWindow.addComponent(ipnTable);
+ layout.addComponent(ipnTable);
- mainWindow.addComponent(ipnDetail);
+ layout.addComponent(ipnDetail);
- mainWindow.addComponent(new Button("refresh", new ClickListener() {
+ layout.addComponent(new Button("refresh", new ClickListener() {
private static final long serialVersionUID = 1L;
@Override
public void buttonClick(ClickEvent event) {
@@ -70,12 +73,12 @@ public void buttonClick(ClickEvent event) {
}
}));
- return mainWindow;
+ return layout;
}
@Override
- public void init() {
- setMainWindow(buildMainLayout());
+ public void init(VaadinRequest request) {
+ setContent(buildMainView());
loadIPNMessages();
}
2  core/src/main/java/com/streamhead/gae/paypal/variable/TransactionType.java
View
@@ -28,6 +28,8 @@
recurring_payment_expired,
recurring_payment_profile_created,
recurring_payment_skipped,
+ recurring_payment_suspended,
+ recurring_payment_suspended_due_to_max_failed_payment,
send_money,
subscr_cancel,
subscr_eot,
6 pom.xml
View
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.pow.paypal</groupId>
<artifactId>pow-paypal</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>0.0.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Powered by Reindeer PayPal IPN integration project</name>
<description>Powered by Reindeer is a high-level application framework integrating
@@ -40,8 +40,8 @@
</parent>
<properties>
- <vaadin.version>6.6.7</vaadin.version>
- <gae.version>1.7.3</gae.version>
+ <vaadin.version>7.1.2</vaadin.version>
+ <gae.version>1.8.3</gae.version>
</properties>
<modules>
48 war/pom.xml
View
@@ -3,7 +3,7 @@
<parent>
<groupId>com.pow.paypal</groupId>
<artifactId>pow-paypal</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>0.0.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -42,25 +42,51 @@
</properties>
<dependencies>
- <dependency>
- <groupId>com.pow.paypal</groupId>
- <artifactId>pow-paypal-core</artifactId>
- <version>${project.version}</version>
+ <dependency>
+ <groupId>com.google.appengine</groupId>
+ <artifactId>appengine-api-1.0-sdk</artifactId>
+ <version>${gae.version}</version>
</dependency>
+ <dependency>
+ <groupId>com.pow.paypal</groupId>
+ <artifactId>pow-paypal-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
-
+
<build>
<finalName>pow-paypal-war</finalName>
<plugins>
<plugin>
- <groupId>net.kindleit</groupId>
- <artifactId>maven-gae-plugin</artifactId>
- <version>0.9.5</version>
+ <groupId>com.google.appengine</groupId>
+ <artifactId>appengine-maven-plugin</artifactId>
+ <version>${gae.version}</version>
<configuration>
- <serverId>appengine.google.com</serverId>
- <sdkDir>${gae.home}</sdkDir>
+ <port>${gae.port}</port>
</configuration>
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>debug</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.google.appengine</groupId>
+ <artifactId>appengine-maven-plugin</artifactId>
+ <version>${gae.version}</version>
+ <configuration>
+ <port>${gae.port}</port>
+ <jvmFlags>
+ <jvmFlag>-Xdebug</jvmFlag>
+ <jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag>
+ </jvmFlags>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
8 war/src/main/webapp/WEB-INF/web.xml
View
@@ -36,12 +36,10 @@
<servlet>
<servlet-name>PayPal Test Application</servlet-name>
<servlet-class>
- com.vaadin.terminal.gwt.server.GAEApplicationServlet</servlet-class>
+ com.vaadin.server.GAEVaadinServlet</servlet-class>
<init-param>
- <description>
- Vaadin application class to start</description>
- <param-name>application</param-name>
- <param-value>com.streamhead.gae.paypal.PayPalApplication</param-value>
+ <param-name>UI</param-name>
+ <param-value>com.streamhead.gae.paypal.PayPalApplicationUI</param-value>
</init-param>
</servlet>

No commit comments for this range

Something went wrong with that request. Please try again.