[google-appengine] In-container testing: Arquillian or Remote API?

2014-01-06 Thread stephanos
Hi everyone,

we are getting started to write some Selenium test for our Java App Engine 
application. 
Since we want to do some setup/teardown we'd like to do *in-container*testing.

As far as I see there are two options:

   - start the local devserver via Java and run commands via the Remote 
APIhttps://developers.google.com/appengine/docs/java/tools/remoteapi
   - use Arquillian http://arquillian.org/ with arquillian-container-gae 
https://github.com/alesj/arquillian-container-gae

What are the pros and cons of Arquillian here?

Regards
Stephan

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Confusing behavior with sockets and pygeocoder in App Engine

2014-01-06 Thread Adrian
I went with option #2... option #1 didn't work... thank you very much for 
your help!!

On Friday, January 3, 2014 11:02:29 PM UTC-5, Vinny P wrote:

 On Thu, Jan 2, 2014 at 1:54 PM, Adrian Randall 
 adrianj...@gmail.comjavascript:
  wrote:

 I am typing this from my phone so I apologize in advance for any odd 
 formatting.
 But then the pygeocoder library fails:
 ConnectionError: HTTPSConnectionPool(host='maps.google.com', port=443):
 Max retries exceeded with url: 
 /maps/api/geocode/jsonregion=sensor=falsebounds=language=
 address=New+York%2CNew+York+United+States
 (Caused by class 
 'google.appengine.api.remote_socket._remote_socket_error.error':
 [Errno 13] Permission denied)

  


 I see you've posted the error text; can you also post the error traceback?

 There are a few solutions you can try:

 1. Sometimes the Sockets API doesn't play well with SSL. Can you try 
 editing the pygeocoder source to use http:// instead of http*s*://? In 
 other words, go to pygeocoder.py ( 
 http://code.xster.net/pygeocoder/src/b3ae6365ff6179be903c9e222470cdcd3361405e/pygeocoder.py?at=default
  ), 
 go to line 50, and edit the variable GEOCODE_QUERY_URL to use *http://*.

 2. Deploy two separate applications in the same application ID (give them 
 different version numbers). One application can use sockets to pull down 
 large files, while the other application can use URLFetch for the Geocoder 
 API.


 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 App Engine Code Samples: http://www.learntogoogleit.com
  


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Can't get a module to start via a cron job

2014-01-06 Thread Adrian
I am having trouble with getting a cron job to start a module... I made a 
post to Stackoverflow that has the problem... I was going to repost here, 
but everything is formatted on Stackoverflow. 

http://stackoverflow.com/questions/20941622/how-to-load-a-basic-module-from-a-cron-job

Does anyone have any ideas? Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: In-container testing: Arquillian or Remote API?

2014-01-06 Thread Ales Justin


 What are the pros and cons of Arquillian here?


Pros: 

I would say you are far more flexible.
See all the funky stuff we're doing in GAE TCK:
* https://github.com/GoogleCloudPlatform/appengine-tck

Cons: 

It's sometimes hard to get all the versions of all the components right.
But you can always simply copy what's working in GAE TCK, and you should be 
fine.

-Ales
 

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Google App Engine Datastore Admin Errors on Load

2014-01-06 Thread Arun Shanker Prasad

Hi All,

Whenever I try to access the datastore admin of my application it shows an 
500 error page inside the IFrame. Has anyone else seen this, any 
solutions/workarounds? Googling about this I saw some issues with federated 
login, but I use a custom domain and no federated login.

Thanks,
Arun.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: Processing payments using Paypal, python SDK

2014-01-06 Thread Kaan Soral
If you are inside US you probably didn't notice this, which is good for 
you, however there is a HUGE barrier around payment services

It's extremely hard to accept payments, you have to be a company at least 
and procedures after that are blurry

For example you can only use stripe from US/UK/Ireland - as far as I 
remember

On Saturday, January 4, 2014 9:51:13 PM UTC+2, Doug Anderson wrote:

 My advice would be to use Stripe.com for processing payments.  You'll be 
 amazed at how easy it is to get started AND customers don't have to leave 
 your site!
 (I'm not associated with Stripe in any way... just using it with App 
 Engine and can attest to its ease of use)

 I may re-add PayPal at some point (in addition to Stripe) but it's a pita 
 to deal with the user leaving your site, processing the ipn notifications, 
 and then HOPING the user hits the button to return to your site when he's 
 finished on PayPal.  With PayPal there's no guarantee the user will return 
 to your site (although it's fairly likely).  I've also noticed that the 
 initial redirect to PayPal can take a while (for the page to load).  Just 
 my experience... I'm sure there are others that really like it.


 On Thursday, January 2, 2014 4:52:23 PM UTC-5, Robert Avram wrote:

 I'm trying to figure out how to process payments using paypal python sdk 
 and google app engine.
 the following code seems to work, but I can't figure out, based on the 
 SDK, how to handle the exceptions (wrong credit card number etc).
 I would like the customer to be able to see the error. I would appreciate 
 any input! thanks!!!


 class Buy(generichandler.MainHandler):

 def get(self):

api = paypalrestsdk.set_config(

  mode=sandbox,

  client_id=myclientid,

  client_secret=secret)

api.get_token()

paymentDic = {intent: sale,

  payer: {

payment_method: credit_card,

funding_instruments: [{

 credit_card: {


 type: visa,


 number: 4417119669820331,


 expire_month: 11,


 expire_year: 2018,


 cvv2: 874,


 first_name: Joe,


 last_name: Shopper,


 billing_address: {

   
line1: 52 N Main ST,

   
city: Johnstown,

   
state: OH,

   
postal_code: 43210,

   
country_code: US }}}]},

  transactions: [{

amount: {

  total: 1.47,

  currency: USD,

  details:{

subtotal: 
 1.41,

tax: 0.03,

shipping: 
 0.03}},

description: This is the 
 payment transaction description. }]}

payment = paypalrestsdk.Payment(paymentDic)

payment.create()
 Enter code here...




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: Processing payments using Paypal, python SDK

2014-01-06 Thread Doug Anderson
Stripe is working hard to expand their international support (add Canada to 
your list along with 8 other countries currently in beta).  But I would 
agree that PayPal has the best international/currency support.  With PayPal 
I can be located in the U.S. and accept payments in a variety of currencies 
(as long as I enable my account to allow it). But to my knowledge with 
PayPal you either have to transfer customers to the PayPal site for a 
portion of the processing OR deal with credit card numbers hitting your 
server and thus having to deal with PCI compliance.  I don't even know if 
PCI compliance is possible with App Engine so that may just leave option #1 
(transfering customers to PayPal for a portion of the processing... a 
perfectly viable option... just less than ideal imo)

On Monday, January 6, 2014 2:41:42 PM UTC-5, Kaan Soral wrote:

 If you are inside US you probably didn't notice this, which is good for 
 you, however there is a HUGE barrier around payment services

 It's extremely hard to accept payments, you have to be a company at least 
 and procedures after that are blurry

 For example you can only use stripe from US/UK/Ireland - as far as I 
 remember

 On Saturday, January 4, 2014 9:51:13 PM UTC+2, Doug Anderson wrote:

 My advice would be to use Stripe.com for processing payments.  You'll be 
 amazed at how easy it is to get started AND customers don't have to leave 
 your site!
 (I'm not associated with Stripe in any way... just using it with App 
 Engine and can attest to its ease of use)

 I may re-add PayPal at some point (in addition to Stripe) but it's a pita 
 to deal with the user leaving your site, processing the ipn notifications, 
 and then HOPING the user hits the button to return to your site when he's 
 finished on PayPal.  With PayPal there's no guarantee the user will return 
 to your site (although it's fairly likely).  I've also noticed that the 
 initial redirect to PayPal can take a while (for the page to load).  Just 
 my experience... I'm sure there are others that really like it.


 On Thursday, January 2, 2014 4:52:23 PM UTC-5, Robert Avram wrote:

 I'm trying to figure out how to process payments using paypal python sdk 
 and google app engine.
 the following code seems to work, but I can't figure out, based on the 
 SDK, how to handle the exceptions (wrong credit card number etc).
 I would like the customer to be able to see the error. I would 
 appreciate any input! thanks!!!


 class Buy(generichandler.MainHandler):

 def get(self):

api = paypalrestsdk.set_config(

  mode=sandbox,

  client_id=myclientid,

  client_secret=secret)

api.get_token()

paymentDic = {intent: sale,

  payer: {

payment_method: credit_card,

funding_instruments: [{

 credit_card: {


 type: visa,


 number: 4417119669820331,


 expire_month: 11,


 expire_year: 2018,


 cvv2: 874,


 first_name: Joe,


 last_name: Shopper,


 billing_address: {

 
  line1: 52 N Main ST,

 
  city: Johnstown,

 
  state: OH,

 
  postal_code: 43210,

 
  country_code: US }}}]},

  transactions: [{

amount: {

  total: 1.47,

  currency: USD,

  details:{

subtotal: 
 1.41,

tax: 0.03
 ,

shipping: 
 0.03}},

description: This is the 
 payment transaction description. }]}

payment = paypalrestsdk.Payment(paymentDic)

payment.create()
 Enter code here...





[google-appengine] Re: Processing payments using Paypal, python SDK

2014-01-06 Thread Kaan Soral
I was set on Braintree last time I assessed the market, currently deciding 
on how to incorporate locally, Braintree seems to have the widest coverage 
for a simplistic/elegant solution similar to Stripe

I think Paypal is a major turn off from many aspects, I would use a layer 
similar to Paymentwall to handle all-else payments other than credit cards

Spreedly is also extremely promising, it's not a payment gateway but rather 
a PCI workaround that enables one to switch from one provider to another or 
use multiple providers etc

(Paypal/Braintree acquisition was alarming, I hope they don't mess 
braintree too :)

A beautiful reference for anyone who are interested: 
https://spreedly.com/gateways

On Monday, January 6, 2014 10:16:56 PM UTC+2, Doug Anderson wrote:

 Stripe is working hard to expand their international support (add Canada 
 to your list along with 8 other countries currently in beta).  But I would 
 agree that PayPal has the best international/currency support.  With PayPal 
 I can be located in the U.S. and accept payments in a variety of currencies 
 (as long as I enable my account to allow it). But to my knowledge with 
 PayPal you either have to transfer customers to the PayPal site for a 
 portion of the processing OR deal with credit card numbers hitting your 
 server and thus having to deal with PCI compliance.  I don't even know if 
 PCI compliance is possible with App Engine so that may just leave option #1 
 (transfering customers to PayPal for a portion of the processing... a 
 perfectly viable option... just less than ideal imo)

 On Monday, January 6, 2014 2:41:42 PM UTC-5, Kaan Soral wrote:

 If you are inside US you probably didn't notice this, which is good for 
 you, however there is a HUGE barrier around payment services

 It's extremely hard to accept payments, you have to be a company at least 
 and procedures after that are blurry

 For example you can only use stripe from US/UK/Ireland - as far as I 
 remember

 On Saturday, January 4, 2014 9:51:13 PM UTC+2, Doug Anderson wrote:

 My advice would be to use Stripe.com for processing payments.  You'll be 
 amazed at how easy it is to get started AND customers don't have to leave 
 your site!
 (I'm not associated with Stripe in any way... just using it with App 
 Engine and can attest to its ease of use)

 I may re-add PayPal at some point (in addition to Stripe) but it's a 
 pita to deal with the user leaving your site, processing the ipn 
 notifications, and then HOPING the user hits the button to return to your 
 site when he's finished on PayPal.  With PayPal there's no guarantee the 
 user will return to your site (although it's fairly likely).  I've also 
 noticed that the initial redirect to PayPal can take a while (for the page 
 to load).  Just my experience... I'm sure there are others that really like 
 it.


 On Thursday, January 2, 2014 4:52:23 PM UTC-5, Robert Avram wrote:

 I'm trying to figure out how to process payments using paypal python 
 sdk and google app engine.
 the following code seems to work, but I can't figure out, based on the 
 SDK, how to handle the exceptions (wrong credit card number etc).
 I would like the customer to be able to see the error. I would 
 appreciate any input! thanks!!!


 class Buy(generichandler.MainHandler):

 def get(self):

api = paypalrestsdk.set_config(

  mode=sandbox,

  client_id=myclientid,

  client_secret=secret)

api.get_token()

paymentDic = {intent: sale,

  payer: {

payment_method: credit_card,

funding_instruments: [{

 credit_card: 
 {


 type: visa,


 number: 4417119669820331,


 expire_month: 11,


 expire_year: 2018,


 cvv2: 874,


 first_name: Joe,


 last_name: Shopper,


 billing_address: {

 
  line1: 52 N Main ST,

 
  city: Johnstown,

 
  state: OH,

 
  postal_code: 43210,

 

Re: [google-appengine] Processing payments using Paypal, python SDK

2014-01-06 Thread Andreas Schmid
paypal has a rest api and you don’t need to redirect the customers to paypal. 
but paypal is a pain to deal with in any case… and customer service is very bad.
i believe you need to be PCI compliant only if you store the credit card data, 
not if you just process the api call on server side.

another great service is www.braintreepayments.com which works all over the 
world.

On Jan 6, 2014, at 3:26 PM, Kaan Soral kaanso...@gmail.com wrote:

 I was set on Braintree last time I assessed the market, currently deciding on 
 how to incorporate locally, Braintree seems to have the widest coverage for a 
 simplistic/elegant solution similar to Stripe
 
 I think Paypal is a major turn off from many aspects, I would use a layer 
 similar to Paymentwall to handle all-else payments other than credit cards
 
 Spreedly is also extremely promising, it's not a payment gateway but rather a 
 PCI workaround that enables one to switch from one provider to another or use 
 multiple providers etc
 
 (Paypal/Braintree acquisition was alarming, I hope they don't mess braintree 
 too :)
 
 A beautiful reference for anyone who are interested: 
 https://spreedly.com/gateways
 
 On Monday, January 6, 2014 10:16:56 PM UTC+2, Doug Anderson wrote:
 Stripe is working hard to expand their international support (add Canada to 
 your list along with 8 other countries currently in beta).  But I would agree 
 that PayPal has the best international/currency support.  With PayPal I can 
 be located in the U.S. and accept payments in a variety of currencies (as 
 long as I enable my account to allow it). But to my knowledge with PayPal you 
 either have to transfer customers to the PayPal site for a portion of the 
 processing OR deal with credit card numbers hitting your server and thus 
 having to deal with PCI compliance.  I don't even know if PCI compliance is 
 possible with App Engine so that may just leave option #1 (transfering 
 customers to PayPal for a portion of the processing... a perfectly viable 
 option... just less than ideal imo)
 
 On Monday, January 6, 2014 2:41:42 PM UTC-5, Kaan Soral wrote:
 If you are inside US you probably didn't notice this, which is good for you, 
 however there is a HUGE barrier around payment services
 
 It's extremely hard to accept payments, you have to be a company at least and 
 procedures after that are blurry
 
 For example you can only use stripe from US/UK/Ireland - as far as I remember
 
 On Saturday, January 4, 2014 9:51:13 PM UTC+2, Doug Anderson wrote:
 My advice would be to use Stripe.com for processing payments.  You'll be 
 amazed at how easy it is to get started AND customers don't have to leave 
 your site!
 (I'm not associated with Stripe in any way... just using it with App Engine 
 and can attest to its ease of use)
 
 I may re-add PayPal at some point (in addition to Stripe) but it's a pita to 
 deal with the user leaving your site, processing the ipn notifications, and 
 then HOPING the user hits the button to return to your site when he's 
 finished on PayPal.  With PayPal there's no guarantee the user will return to 
 your site (although it's fairly likely).  I've also noticed that the initial 
 redirect to PayPal can take a while (for the page to load).  Just my 
 experience... I'm sure there are others that really like it.
 
 
 On Thursday, January 2, 2014 4:52:23 PM UTC-5, Robert Avram wrote:
 I'm trying to figure out how to process payments using paypal python sdk and 
 google app engine.
 the following code seems to work, but I can't figure out, based on the SDK, 
 how to handle the exceptions (wrong credit card number etc).
 I would like the customer to be able to see the error. I would appreciate any 
 input! thanks!!!
 
 
 class Buy(generichandler.MainHandler):
 def get(self):
 
api = paypalrestsdk.set_config(
 
  mode=sandbox,
 
  client_id=myclientid,
 
  client_secret=secret)
 
api.get_token()
 
paymentDic = {intent: sale,
 
  payer: {
 
payment_method: credit_card,
 
funding_instruments: [{
 
 credit_card: {
 

 type: visa,
 

 number: 4417119669820331,
 

 expire_month: 11,
 

 expire_year: 2018,
 

 cvv2: 874,
 

 first_name: Joe,
 

 last_name: Shopper,
 

 billing_address: {
 
 

Re: [google-appengine] Re: how to start all modules instances on dev server?

2014-01-06 Thread Andrew Jessup
Tapir, was the bad character in the App Engine documentation somewhere? If 
so, where?

On Sunday, 5 January 2014 00:33:33 UTC-8, Tapir wrote:

 Ok, found the problem by accident.

 After finding the google maven example on github works well, I copied the 
 META-INF folder to my project.
 A replace files dialog was expected to show up.
 But, no, it didn't show!
 Then there are two META-INF folders in my project.
 Two identical folders in my project!!!

 Researched it for a while, I copy the two folder name into a notepad file, 
 the difference is obvious.
 One - character is longer than the other one.
  (But in windows file explorer, they are the same length! However, in IE 
 browser,  the shorter one becomes longer)
 The hexdump shows the longer is e22d 9180, the shorter one is 000A.

 Ok, the short one is the correct one. It is META-INF
 The longer one is META-INF.

 So, it looks it must be my mistake?
 Aha, no.
 I search the longer one in the google document: 
 https://developers.google.com/appengine/docs/java/modules/
 Eh, it seems this page mixes the longer one and the shorter one many times.
 I'm so lucky that I picked the wrong one.

 Can't believe no one else has found this problem before. 
 Does this mean there are very few projects using the modules feature?




 On Thursday, January 2, 2014 5:31:01 PM UTC+8, Tapir wrote:



 On Thursday, January 2, 2014 3:31:14 PM UTC+8, Vinny P wrote:

 On Wed, Jan 1, 2014 at 11:03 PM, Tapir tapi...@gmail.com wrote:

 This page mentions all modules instances will be started. 
 https://developers.google.com/appengine/docs/java/modules/routing
 But I don't how to do this. When call dev_server on a second module, it 
 says:
 Could not open the requested socket: Address already in use: bind. Try 
 overriding --address and/or --port.




 The dev server should be starting up all the modules automatically, you 
 don't need to call the dev server a second time.

 When you call the dev server on the second module - after already 
 calling it on the first module - the second dev server instance is unable 
 to run because (as it points out in the error text) the first dev server 
 instance is already bound to the port. So this is correct behavior.


 On Wed, Jan 1, 2014 at 11:03 PM, Tapir tapi...@gmail.com wrote:

 If I call dev_server on the ear directory, it says

 com.google.apphosting.utils.config.AppEngineConfigException: Could not 
 locate D:\my-project\ear\WEB-INF\appengine-web.xml

 yes, there is no WEB-INF in the ear folder but only a META-INF folder 
 and module folders in the ear folder.




 More than likely, the dev server is interpreting your folder as a basic, 
 single-module application rather than a multi-module application (i.e. JAR 
 rather than an EAR). Can you post the stack trace for the 
 AppEngineConfigException?


 yes, I think so. How to let dev_server not interpret the folder as a 
 single-module app?

 The folder structure is like this:
 my-project
 --- ear
 -- META-INF
 - appengine-application.xml
 - application.xml
 -- default
 - war
  WEB-INF
 --- appengine-web.xml
  web.xml
 -- websockets
 - war
  WEB-INF
 --- appengine-web.xml
  web.xml

 The following is added in application.xml:

   module
 web
   web-uridefault/web-uri
   context-rootdefault/context-root
 /web
   /module
   module
 web
   web-uriwebsokets/web-uri
   context-rootwebsokets/context-root
 /web
   /module

 I downloaded the example on git, but I dislike the mvn style so I give up 
 it.
 The mvn style hide too many details, so I think it is not a good example 
 to start.

 Afte run dev_appserver.cmd ear, the stack trace is output:

 Jan 02, 2014 5:15:46 PM 
 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
 SEVERE: Received exception processing 
 D:\my-project\ear\WEB-INF/appengine-web.xml
 com.google.apphosting.utils.config.AppEngineConfigException: Could not 
 locate D:\my-project\ear\WEB-INF\appengine-web.xml
 at 
 com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:140)
 at 
 com.google.apphosting.utils.config.AppEngineWebXmlReader.readAppEngineWebXml(AppEngineWebXmlReader.java:75)
 at 
 com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:166)
 at 
 com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:399)
 at 
 com.google.appengine.tools.development.ApplicationConfigurationManager.init(ApplicationConfigurationManager.java:146)
 at 
 com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:88)
 at 
 com.google.appengine.tools.development.DevAppServerImpl.init(DevAppServerImpl.java:139)
 

Re: [google-appengine] Processing payments using Paypal, python SDK

2014-01-06 Thread Kaan Soral
should be that way but the page and request has to be https/secure as far 
as I remember

On Monday, January 6, 2014 10:47:02 PM UTC+2, aschmid wrote:

 paypal has a rest api and you don’t need to redirect the customers to 
 paypal. but paypal is a pain to deal with in any case… and customer service 
 is very bad.
 i believe you need to be PCI compliant only if you store the credit card 
 data, not if you just process the api call on server side.

 another great service is www.braintreepayments.com which works all over 
 the world.

 On Jan 6, 2014, at 3:26 PM, Kaan Soral kaan...@gmail.com javascript: 
 wrote:

 I was set on Braintree last time I assessed the market, currently deciding 
 on how to incorporate locally, Braintree seems to have the widest coverage 
 for a simplistic/elegant solution similar to Stripe

 I think Paypal is a major turn off from many aspects, I would use a layer 
 similar to Paymentwall to handle all-else payments other than credit cards

 Spreedly is also extremely promising, it's not a payment gateway but 
 rather a PCI workaround that enables one to switch from one provider to 
 another or use multiple providers etc

 (Paypal/Braintree acquisition was alarming, I hope they don't mess 
 braintree too :)

 A beautiful reference for anyone who are interested: 
 https://spreedly.com/gateways

 On Monday, January 6, 2014 10:16:56 PM UTC+2, Doug Anderson wrote:

 Stripe is working hard to expand their international support (add Canada 
 to your list along with 8 other countries currently in beta).  But I would 
 agree that PayPal has the best international/currency support.  With PayPal 
 I can be located in the U.S. and accept payments in a variety of currencies 
 (as long as I enable my account to allow it). But to my knowledge with 
 PayPal you either have to transfer customers to the PayPal site for a 
 portion of the processing OR deal with credit card numbers hitting your 
 server and thus having to deal with PCI compliance.  I don't even know if 
 PCI compliance is possible with App Engine so that may just leave option #1 
 (transfering customers to PayPal for a portion of the processing... a 
 perfectly viable option... just less than ideal imo)

 On Monday, January 6, 2014 2:41:42 PM UTC-5, Kaan Soral wrote:

 If you are inside US you probably didn't notice this, which is good for 
 you, however there is a HUGE barrier around payment services

 It's extremely hard to accept payments, you have to be a company at 
 least and procedures after that are blurry

 For example you can only use stripe from US/UK/Ireland - as far as I 
 remember

 On Saturday, January 4, 2014 9:51:13 PM UTC+2, Doug Anderson wrote:

 My advice would be to use Stripe.com for processing payments.  You'll 
 be amazed at how easy it is to get started AND customers don't have to 
 leave your site!
 (I'm not associated with Stripe in any way... just using it with App 
 Engine and can attest to its ease of use)

 I may re-add PayPal at some point (in addition to Stripe) but it's a 
 pita to deal with the user leaving your site, processing the ipn 
 notifications, and then HOPING the user hits the button to return to your 
 site when he's finished on PayPal.  With PayPal there's no guarantee the 
 user will return to your site (although it's fairly likely).  I've also 
 noticed that the initial redirect to PayPal can take a while (for the page 
 to load).  Just my experience... I'm sure there are others that really 
 like 
 it.


 On Thursday, January 2, 2014 4:52:23 PM UTC-5, Robert Avram wrote:

 I'm trying to figure out how to process payments using paypal python 
 sdk and google app engine.
 the following code seems to work, but I can't figure out, based on the 
 SDK, how to handle the exceptions (wrong credit card number etc).
 I would like the customer to be able to see the error. I would 
 appreciate any input! thanks!!!


 class Buy(generichandler.MainHandler):

 def get(self):

api = paypalrestsdk.set_config(

  mode=sandbox,

  client_id=myclientid,

  client_secret=secret)

api.get_token()

paymentDic = {intent: sale,

  payer: {

payment_method: credit_card,

funding_instruments: [{

 credit_card: 
 {


 type: visa,


 number: 4417119669820331,


 expire_month: 11,


 expire_year: 2018,


 cvv2: 874,


 first_name: Joe,

 

[google-appengine] Implementing OAuth 2.0 'application only authentication' on App Engine

2014-01-06 Thread Dan
I have an App Engine server that provides a REST API and would like to 
protect it with OAuth 2.0. Applications that use my REST API will be run on 
headless servers and not have any user input i.e. no web browser redirects 
for users to enter their username and password.

Twitter does more or less what I want with its Application Only 
Authhttps://dev.twitter.com/docs/auth/application-only-auth which 
uses the Client Credentials 
Granthttp://tools.ietf.org/html/rfc6749#section-4.4 approach 
of OAuth 2.0.

Does the App Engine OAuth 
servicehttps://developers.google.com/appengine/docs/python/oauth/ allow 
me to do this? If so how? (I find the documentation confusing and can't get 
a 2-legged approach to work in any case.) Otherwise where should I look for 
an alternative as I don't want to reinvent the wheel especially with 
security related parts of my app.

I would appreciate pointers to Go resources, but Python would also work for 
me.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Backend instance hours on Usage History

2014-01-06 Thread Vinny P
On Sun, Jan 5, 2014 at 6:52 AM, Béla Uzonyi uzon...@gmail.com wrote:

 The Usage History page is still showing about twice as much B1 instance
 hours as the Dashboard. Is there a ticket opened for this somewhere?




There are a couple of incorrect-usage-reported issues floating around the
tracker, such as this one:
https://code.google.com/p/googleappengine/issues/detail?id=7627

If you search this forum, you'll see similar reports of instance hours
being incorrectly reported.


-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Google App Engine Datastore Admin Errors on Load

2014-01-06 Thread Vinny P
On Mon, Jan 6, 2014 at 1:40 PM, Arun Shanker Prasad 
arunshankerpra...@gmail.com wrote:

 Whenever I try to access the datastore admin of my application it shows an
 500 error page inside the IFrame. Has anyone else seen this, any
 solutions/workarounds? Googling about this I saw some issues with federated
 login, but I use a custom domain and no federated login.



Try opening the datastore admin frame contents in a new tab or window.
Depending on your browser, you might be able to simply right click on the
frame and select *Open Frame In New Window*. If you don't see that option,
try a plugin such as this one:
https://chrome.google.com/webstore/detail/open-frame-in-new-tab/jjjodgdplcalapdbmmgadocimcahehjf

Also, make sure you're only logged into one Google account and not multiple
accounts; you can do this by opening a new Incognito window (or your
browser's equivalent) and then logging into the Google account attached to
App Engine.


-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Can't get a module to start via a cron job

2014-01-06 Thread Vinny P
On Mon, Jan 6, 2014 at 8:05 AM, Adrian adrianj.rand...@gmail.com wrote:

 I am having trouble with getting a cron job to start a module... I made a
 post to Stackoverflow that has the problem.



Can you supply the full traceback from the error?


-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Can't get a module to start via a cron job

2014-01-06 Thread Adrian
Thanks Vinny -- here is the full traceback:

Traceback (most recent call last):
  File /home/adrian/google_appengine/lib/webapp2-2.5.1/webapp2.py, line 
1536, in __call__
rv = self.handle_exception(request, response, e)
  File /home/adrian/google_appengine/lib/webapp2-2.5.1/webapp2.py, line 
1530, in __call__
rv = self.router.dispatch(request, response)
  File /home/adrian/google_appengine/lib/webapp2-2.5.1/webapp2.py, line 
1278, in default_dispatcher
return route.handler_adapter(request, response)
  File /home/adrian/google_appengine/lib/webapp2-2.5.1/webapp2.py, line 
1102, in __call__
return handler.dispatch()
  File /home/adrian/google_appengine/lib/webapp2-2.5.1/webapp2.py, line 
572, in dispatch
return self.handle_exception(e, self.app.debug)
  File /home/adrian/google_appengine/lib/webapp2-2.5.1/webapp2.py, line 
570, in dispatch
return method(*args, **kwargs)
  File /home/adrian/arapphost/callLoadAndProcess.py, line 10, in get
modules.start_module(loadandprocess,1)
  File 
/home/adrian/google_appengine/google/appengine/api/modules/modules.py, 
line 385, in start_module
rpc.get_result()
  File 
/home/adrian/google_appengine/google/appengine/api/apiproxy_stub_map.py, 
line 612, in get_result
return self.__get_result_hook(self)
  File 
/home/adrian/google_appengine/google/appengine/api/modules/modules.py, 
line 403, in _ResultHook
_CheckAsyncResult(rpc, mapped_errors)
  File 
/home/adrian/google_appengine/google/appengine/api/modules/modules.py, 
line 138, in _CheckAsyncResult
raise mapped_error()
InvalidVersionError


On Monday, January 6, 2014 8:00:01 PM UTC-5, Vinny P wrote:

 On Mon, Jan 6, 2014 at 8:05 AM, Adrian adrianj...@gmail.com javascript:
  wrote:

 I am having trouble with getting a cron job to start a module... I made a 
 post to Stackoverflow that has the problem.



 Can you supply the full traceback from the error? 
  

 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 App Engine Code Samples: http://www.learntogoogleit.com
  

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Some confused on free instances limit for each module.

2014-01-06 Thread Vinny P
On Sun, Jan 5, 2014 at 8:29 PM, Tapir tapir@gmail.com wrote:

 At the end of the document:
 https://developers.google.com/appengine/docs/java/modules/
 it says Maximum Instances per Manual/Basic Scaling Version for Free App
 is 20.
 Not very understand this. Haven't google limited the number of free
 instances to one, or total free instance hours to 28 long long ago?



The total free instance hours per day is 28, but you can choose to spend
those hours however you want. You can choose to run 1 instance for 24 hours
a day, 2 instances in parallel for 14 hours a day, 3 instances in parallel
for 9.3 hours per day, etc.

Granted, most people choose not to do that but it is possible.


-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Some confused on free instances limit for each module.

2014-01-06 Thread Tapir


On Tuesday, January 7, 2014 9:06:30 AM UTC+8, Vinny P wrote:

 On Sun, Jan 5, 2014 at 8:29 PM, Tapir tapi...@gmail.com javascript:
  wrote:

 At the end of the document: 
 https://developers.google.com/appengine/docs/java/modules/
 it says Maximum Instances per Manual/Basic Scaling Version for Free App 
 is 20.
 Not very understand this. Haven't google limited the number of free 
 instances to one, or total free instance hours to 28 long long ago?



 The total free instance hours per day is 28, but you can choose to spend 
 those hours however you want. You can choose to run 1 instance for 24 hours 
 a day, 2 instances in parallel for 14 hours a day, 3 instances in parallel 
 for 9.3 hours per day, etc. 

 Granted, most people choose not to do that but it is possible. 


Thanks for explanation. 
But I think the document is still some misleading.
 

  
  
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 App Engine Code Samples: http://www.learntogoogleit.com
  

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Re: how to start all modules instances on dev server?

2014-01-06 Thread Tapir


On Tuesday, January 7, 2014 4:59:58 AM UTC+8, Andrew Jessup wrote:

 Tapir, was the bad character in the App Engine documentation somewhere? If 
 so, where?


En ha, yes, there are some META-INF and some META-INF.
I have already reported this bug.
And It seems this bug was fixed just now.
At the end of that page, it show Last updated January 7, 2014.
 


 On Sunday, 5 January 2014 00:33:33 UTC-8, Tapir wrote:

 Ok, found the problem by accident.

 After finding the google maven example on github works well, I copied the 
 META-INF folder to my project.
 A replace files dialog was expected to show up.
 But, no, it didn't show!
 Then there are two META-INF folders in my project.
 Two identical folders in my project!!!

 Researched it for a while, I copy the two folder name into a notepad 
 file, the difference is obvious.
 One - character is longer than the other one.
  (But in windows file explorer, they are the same length! However, in IE 
 browser,  the shorter one becomes longer)
 The hexdump shows the longer is e22d 9180, the shorter one is 000A.

 Ok, the short one is the correct one. It is META-INF
 The longer one is META-INF.

  


 So, it looks it must be my mistake?
 Aha, no.
 I search the longer one in the google document: 
 https://developers.google.com/appengine/docs/java/modules/
 Eh, it seems this page mixes the longer one and the shorter one many 
 times.
 I'm so lucky that I picked the wrong one.

 Can't believe no one else has found this problem before. 
 Does this mean there are very few projects using the modules feature?




 On Thursday, January 2, 2014 5:31:01 PM UTC+8, Tapir wrote:



 On Thursday, January 2, 2014 3:31:14 PM UTC+8, Vinny P wrote:

 On Wed, Jan 1, 2014 at 11:03 PM, Tapir tapi...@gmail.com wrote:

 This page mentions all modules instances will be started. 
 https://developers.google.com/appengine/docs/java/modules/routing
 But I don't how to do this. When call dev_server on a second module, 
 it says:
 Could not open the requested socket: Address already in use: bind. Try 
 overriding --address and/or --port.




 The dev server should be starting up all the modules automatically, you 
 don't need to call the dev server a second time.

 When you call the dev server on the second module - after already 
 calling it on the first module - the second dev server instance is unable 
 to run because (as it points out in the error text) the first dev server 
 instance is already bound to the port. So this is correct behavior.


 On Wed, Jan 1, 2014 at 11:03 PM, Tapir tapi...@gmail.com wrote:

 If I call dev_server on the ear directory, it says

 com.google.apphosting.utils.config.AppEngineConfigException: Could not 
 locate D:\my-project\ear\WEB-INF\appengine-web.xml

 yes, there is no WEB-INF in the ear folder but only a META-INF folder 
 and module folders in the ear folder.




 More than likely, the dev server is interpreting your folder as a 
 basic, single-module application rather than a multi-module application 
 (i.e. JAR rather than an EAR). Can you post the stack trace for the 
 AppEngineConfigException?


 yes, I think so. How to let dev_server not interpret the folder as a 
 single-module app?

 The folder structure is like this:
 my-project
 --- ear
 -- META-INF
 - appengine-application.xml
 - application.xml
 -- default
 - war
  WEB-INF
 --- appengine-web.xml
  web.xml
 -- websockets
 - war
  WEB-INF
 --- appengine-web.xml
  web.xml

 The following is added in application.xml:

   module
 web
   web-uridefault/web-uri
   context-rootdefault/context-root
 /web
   /module
   module
 web
   web-uriwebsokets/web-uri
   context-rootwebsokets/context-root
 /web
   /module

 I downloaded the example on git, but I dislike the mvn style so I give 
 up it.
 The mvn style hide too many details, so I think it is not a good example 
 to start.

 Afte run dev_appserver.cmd ear, the stack trace is output:

 Jan 02, 2014 5:15:46 PM 
 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
 SEVERE: Received exception processing 
 D:\my-project\ear\WEB-INF/appengine-web.xml
 com.google.apphosting.utils.config.AppEngineConfigException: Could not 
 locate D:\my-project\ear\WEB-INF\appengine-web.xml
 at 
 com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:140)
 at 
 com.google.apphosting.utils.config.AppEngineWebXmlReader.readAppEngineWebXml(AppEngineWebXmlReader.java:75)
 at 
 com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:166)
 at 
 com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:399)
 at 
 

Re: [google-appengine] Can't get a module to start via a cron job

2014-01-06 Thread Vinny P
On Mon, Jan 6, 2014 at 7:03 PM, Adrian adrianj.rand...@gmail.com wrote:

   File /home/adrian/arapphost/callLoadAndProcess.py, line 10, in get
 modules.start_module(loadandprocess,1)
   File
 /home/adrian/google_appengine/google/appengine/api/modules/modules.py,
 line 385, in start_module
 rpc.get_result()



The traceback claims that the module and version you're referring to
doesn't exist. Try to debug the problem by:

1. Sometimes modules throw up unusual errors when versions are expressed as
pure numbers instead of a mix of letters and numbers. In
loadandprocess.yaml, change *version: 1* to *version: one*. Remember to
update *callLoadAndProcess.py* with the correct version (the *start_module*
 call).

2. You can use *get_modules()* and *get_versions(module=___)* in the
*modules* package to enumerate all the modules and all the versions of a
given module that App Engine recognizes within your application. App Engine
may be recording the module under a different name or version.

-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.