Esempio n. 1
0
                eticket = str(packageid) + ':' + str(pricepoint)
                # ========================================================================> preparing package processor
                merchantbillconfig = db_agent.merchantbillconfig(pricepoint)
                if one_click_pos or one_click_ws:
                    db_agent.update_merchantbillconfig_oneclick(
                        pricepoint, 1)  # enabling 1click if its not enabled

                if single_use_promo:
                    db_agent.update_pp_singleuse_promo(pricepoint, 1, 1)
                else:
                    db_agent.update_pp_singleuse_promo(
                        pricepoint, 1, 0)  # feature 1 is single use promo
                pricepoint_type = merchantbillconfig[0]['Type']
                package = db_agent.package(packageid)
                db_agent.update_processor(processors[0], packageid)
                db_agent.update_package(packageid, merchantid, pricepoint)

                transaction_record = web.create_transaction(
                    pricepoint_type, eticket, selected_options, enviroment,
                    merchantid, url_options, processors[0])
                multitrans_base_record = mt.build_multitrans(
                    merchantbillconfig[0], package[0], transaction_record,
                    url_options)
                differences_multitrans = mt.multitrans_compare(
                    multitrans_base_record, transaction_record['full_record'])

                asset_base_record = asset.build_asset_signup(
                    merchantbillconfig[0], multitrans_base_record,
                    transaction_record)
                differences_asset = asset.asset_compare(asset_base_record)
            pricepoints = config.pricepoints
        for pricepoint in pricepoints:
            # selected_language = random.choice(config.available_languages)
            try:
                merchantbillconfig = db_agent.merchantbillconfig(pricepoint)
                if config.one_click_pos or config.one_click_ws:
                    db_agent.update_merchantbillconfig_oneclick(
                        pricepoint, 1)  # enabling 1click if its not enabled
                if config.single_use_promo:
                    db_agent.update_pp_singleuse_promo(pricepoint, 1, 1)
                else:
                    db_agent.update_pp_singleuse_promo(
                        pricepoint, 1, 0)  # feature 1 is single use promo
                pricepoint_type = merchantbillconfig[0]['Type']
                package = db_agent.package(config.packageid)
                db_agent.update_processor(config.test_data['processor'],
                                          config.packageid)
                db_agent.update_package(config.packageid, merchantid,
                                        pricepoint)
                for selected_language in config.available_languages:
                    for dmc in config.available_currencies:

                        eticket = str(config.packageid) + ':' + str(pricepoint)
                        # ========================================================================> preparing package processor
                        selected_options = [dmc, selected_language]

                        # =======================================================================================================Starting Transactions
                        transaction_record = web.create_transaction(
                            pricepoint_type, eticket, selected_options,
                            merchantid, url_options,
                            config.test_data['processor'])