Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
??????? ??? ? ????? ?? ?????????? ????????:
    hash = MD5(MD5(str_to_hash) + salt)
?????? str_to_hash ??????????? ????????????? ????????? ?????????? ???????:
    order_id + order_total + transaction_id + payer_email + seller_name + shop_id

        def calculate_hash(data, salt):
    """ ??????? ??? ? ????? ?? ?????????? ????????:
            hash = MD5(MD5(str_to_hash) + salt)
        ?????? str_to_hash ??????????? ????????????? ????????? ?????????? ???????:
            order_id + order_total + transaction_id + payer_email + seller_name + shop_id
    """

    # ??? ?????? ????????? ???????? ?????? ?????? ??? ???????????
    FIELDS_ORDER = ('order_id', 'order_total', 'transaction_id', 'payer_email', 'seller_name', 'shop_id')
    data_as_list = [str(data[field]) for field in FIELDS_ORDER]
    str_to_hash = smart_str(''.join(data_as_list), 'utf-8')

    return md5(str_to_hash + salt).hexdigest()
        


src/d/j/django_payworld-0.1/django_payworld/views.py   django_payworld(Download)
from django_payworld.forms import PaymentForm
from django_payworld.signals import payment_notification, payment_error
from django_payworld.utils import calculate_hash
 
 
            params_dict[param] = request.POST.get(param, "")
        if params_dict['hash'] == calculate_hash(
            params_dict,
            settings.PAYWORLD_SECRET_CODE
        ):

src/s/a/satchmo_payment_payworld-0.1.7/satchmo_payment_payworld/views.py   satchmo_payment_payworld(Download)
import urllib2
from django.views.decorators.csrf import csrf_exempt
from django_payworld.utils import calculate_hash
 
 
    # data is the form data that was submitted to the IPN URL.
 
    hash_summ = calculate_hash(data, secret)
    if hash_summ == data['hash']:
        log.info("PayWorld IPN data verification was successful.")