Example #1
0
    def test_check_crypto_gold_standard(self):
        gold_config = ServicesConfig()
        gold_config.secret_api_key = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A'
        gold_config.service_url = 'https://cert.api2-c.heartlandportico.com'

        ServicesContainer.configure(gold_config, 'gold standard')
        summary = ReportingService.activity()\
            .with_start_date(datetime.datetime.today() + datetime.timedelta(days=-7))\
            .with_end_date(datetime.datetime.today() + datetime.timedelta(days=-1))\
            .execute('gold standard')
        self.assertNotEqual(None, summary)
Example #2
0
    def test_check_crypto_gold_standard(self):
        gold_config = ServicesConfig()
        gold_config.secret_api_key = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A'
        gold_config.service_url = 'https://cert.api2-c.heartlandportico.com'

        ServicesContainer.configure(gold_config, 'gold standard')
        response = self.card.authorize(10)\
            .with_currency('USD')\
            .with_allow_duplicates(True)\
            .execute('gold standard')
        self.assertNotEqual(None, response)
        self.assertEqual('00', response.response_code)
Example #3
0
 def configure_client(self):
     config = ServicesConfig()
     global_payment = self.env['payment.acquirer'].search([
         ('id', '=', self.env.ref('payment.payment_acquirer_global').id)
     ])
     config.merchant_id = global_payment.gp_seller_account
     config.account_id = global_payment.gp_id_account
     config.shared_secret = global_payment.gp_shared_secret_account
     config.service_url = 'https://api.sandbox.realexpayments.com/epage-remote.cgi'
     ServicesContainer.configure(config)
     print(global_payment.gp_seller_account)
     print(config.shared_secret)
Example #4
0
    def test_check_crypto_gold_standard(self):
        gold_config = ServicesConfig()
        gold_config.secret_api_key = 'skapi_cert_MaePAQBr-1QAqjfckFC8FTbRTT120bVQUlfVOjgCBw'
        gold_config.service_url = 'https://cert.api2-c.heartlandportico.com'

        ServicesContainer.configure(gold_config, 'gold standard')
        response = self.track.charge(10)\
            .with_currency('USD')\
            .with_allow_duplicates(True)\
            .execute('gold standard')
        self.assertNotEqual(None, response)
        self.assertEqual('00', response.response_code)
Example #5
0
    def test_check_crypto_gold_standard(self):
        gold_config = ServicesConfig()
        gold_config.secret_api_key = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A'
        gold_config.service_url = 'https://cert.api2-c.heartlandportico.com'

        ServicesContainer.configure(gold_config, 'gold standard')

        payment_method = RecurringPaymentMethod.find(
            self.payment_id('credit'), config_name='gold standard')
        self.assertNotEqual(None, payment_method)

        response = payment_method.charge(14.01)\
            .with_currency('USD')\
            .with_allow_duplicates(True)\
            .execute('gold standard')
        self.assertNotEqual(None, response)
        self.assertEqual('00', response.response_code)