Commits

Mikhail Korobov committed 9d13edb

Typo in method name is fixed

Comments (0)

Files changed (3)

     values = _values_to_encode(data)
     return urlencode(values)
 
-def siganture(data):
+def signature(data):
     """
     Calculates PayFast signature.
     'data' should be a SortedDict or an OrderedDict instance.
 from django.contrib.sites.models import Site
 
 from payfast.models import PayFastOrder
-from payfast.api import siganture, data_is_valid
+from payfast.api import signature, data_is_valid
 from payfast import conf
 
 def full_url(link):
         data = SortedDict()
         for key in self.fields.keys():
             data[key] = self.initial.get(key, None)
-        self._signature = self.fields['signature'].initial = siganture(data)
+        self._signature = self.fields['signature'].initial = signature(data)
 
 
 class NotifyForm(forms.ModelForm):
 
 from payfast.forms import notify_url, PayFastForm
 from payfast.models import PayFastOrder
-from payfast.api import siganture
+from payfast.api import signature
 from payfast import conf
 import payfast.signals
 
 class SignatureTest(unittest.TestCase):
     def test_signature(self):
         data = _test_data()
-        self.assertEqual(siganture(data), 'c71d41dd5041bf28d819fe102ab0106b')
+        self.assertEqual(signature(data), 'c71d41dd5041bf28d819fe102ab0106b')
 
 class NotifyTest(TestCase):