If the item number is blank, ignore the transaction.
This commit is contained in:
parent
569fd9b070
commit
6bbe32bfff
|
@ -1284,7 +1284,7 @@ class Users( object ):
|
|||
|
||||
# verify item_number
|
||||
plan_index = params.get( u"item_number" )
|
||||
if plan_index == None:
|
||||
if plan_index == None or plan_index == u"":
|
||||
return dict() # ignore this transaction if there's no item number
|
||||
|
||||
try:
|
||||
|
|
|
@ -2725,6 +2725,15 @@ class Test_users( Test_controller ):
|
|||
assert len( result ) == 1
|
||||
assert result.get( u"session_id" )
|
||||
|
||||
def test_paypal_notify_payment_blank_item_number( self ):
|
||||
data = dict( self.PAYMENT_DATA )
|
||||
data[ u"custom" ] = self.user.object_id
|
||||
data[ u"item_number" ] = u""
|
||||
result = self.http_post( "/users/paypal_notify", data );
|
||||
|
||||
assert len( result ) == 1
|
||||
assert result.get( u"session_id" )
|
||||
|
||||
def test_paypal_notify_payment_incorrect_gross( self ):
|
||||
data = dict( self.PAYMENT_DATA )
|
||||
data[ u"custom" ] = self.user.object_id
|
||||
|
|
Reference in New Issue