mor_12_api_payment_add
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/test/load_delta_sql/sql/mor_eleven_extend
waitForElementPresent //body
open /billing/test/load_delta_sql/sql/update_balance
waitForElementPresent //body
open /billing/functions/settings
click //div[@id='tabTabdhtmlgoodies_tabView1_8']/span
verifyValue id=allow_api off
verifyValue id=allow_get_api off
check id=allow_api
click id=xml_api_extension
check id=allow_get_api
type id=api_secret_key 123456
clickAndWait name=commit
open /billing/currencies/currencies
clickAndWait id=icon_chech_curr_upd_disable_2
waitForTextPresent Currency update disabled
open /billing/currencies/edit/2
type id=exchange_rate 2
clickAndWait css=input[type="image"]
clickAndWait id=icon_cross_curr_upd_enable_2
waitForTextPresent Currency update enabled
open /billing/test/test_api?user_id=2
waitForTextPresent a09edbe69cdd33c11eab3e22a1b2c57bb42d4ce8
open /billing/callc/logout
open /billing/api/create_payment?user_id=2&test=1&hash=a09edbe69cdd33c11eab3e22a1b2c57bb42d4ce8
waitForTextPresent Bad login
open /billing/api/create_payment?u=admin&p=admin1&user_id=2&test=1&hash=a09edbe69cdd33c11eab3e22a1b2c57bb42d4ce8
waitForTextPresent Payments not allow from api
open /billing/api/create_payment?u=admin&p=admin1&user_id=2&test=1&hash=a09edbe69cdd33c11eab3e22a1b2c57bb42d4ce8
waitForTextPresent Payments not allow from api
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/functions/settings
click //div[@id='tabTabdhtmlgoodies_tabView1_8']/span
verifyTextPresent API allow Payments:
verifyTextPresent API Payment Confirmation:
click id=api_allow_payments
clickAndWait name=commit
waitForTextPresent Settings saved
open /billing/test/test_api?user_id=2&p_currency=EUR
waitForTextPresent 4cfb074e61ce69b9634d5d838d05e20888572905
open /billing/test/test_api?user_id=2&p_currency=EUR&amount=100
waitForTextPresent a7338c6cccac11338782a0ceba9d127011519589
open /billing/test/test_api?user_id=3&p_currency=USD&amount=33
waitForTextPresent 053f9dfec5c64e7f5b8c352251235394d7d48fa0
open /billing/test/test_api?user_id=3&p_currency=USD&amount=55&payer_email=$%^$
waitForTextPresent 4c0d1cbe72dff69350ebdc855b7e13070c221973
open /billing/test/test_api?user_id=78yu&p_currency=USD&amount=55&payer_email=agser@dzbsr.er
waitForTextPresent 6a081bfedb11e06368a601a6325e59b574950fc4
open /billing/test/test_api?user_id=5&p_currency=USD&amount=55&payer_email=sdfg@sdfg.sd&tax_in_amount=1
waitForTextPresent 599d125dec2d2b4b5bc44aea4153cdf2d3172095
open /billing/test/test_api?user_id=3&amount=55&p_currency=USD&paymenttype=manual&transaction=12345678976543
waitForTextPresent 59cb152af1e93963c8edd3ae1707e8d79bf565d7
open /billing/api/create_payment?u=admin1&p=admin1&user_id=2&p_currency=EUR&test=1&hash=4cfb074e61ce69b9634d5d838d05e20888572905
verifyTextPresent Bad login
open /billing/callc/logout
open /billing/api/create_payment?user_id=2&test=1&hash=a09edbe69cdd33c11eab3e22a1b2c57bb42d4ce8
waitForTextPresent Bad login
open /billing/api/create_payment?u=admin1&p=admin1&user_id=2&test=1&hash=a09edbe69cdd33c11eab3e22a1b2c57bb42d4ce8
waitForTextPresent Bad login
open /billing/api/create_payment?u=admin&p=admin1&user_id=2&test=1&hash=a09edbe69cdd33c11eab3e22a1b2c57bb42d4ce8
waitForTextPresent No currency
open /billing/api/create_payment?u=admin&p=admin1&user_id=2&p_currency=2&test=1&hash=4cfb074e61ce69b9634d5d838d05e20888572905
waitForTextPresent Incorrect hash
open /billing/api/create_payment?u=admin1&p=admin1&user_id=2&p_currency=EUR&test=1&hash=4cfb074e61ce69b9634d5d838d05e20888572905
waitForTextPresent Bad login
open /billing/api/create_payment?u=admin&p=admin1&user_id=2&p_currency=EUR&test=1&hash=4cfb074e61ce69b9634d5d838d05e20888572905
verifyText css=status ok
verifyText css=payment_id 10
verifyText css=tax 0.0000
verifyText css=amount 0.0000
verifyText css=gross 0.0000
open /billing/api/create_payment?u=admin&p=admin1&user_id=2&p_currency=EUR&amount=100&test=1&hash=a7338c6cccac11338782a0ceba9d127011519589
verifyText css=status ok
verifyText css=payment_id 11
verifyText css=tax 0.0000
verifyText css=amount 100.0000
verifyText css=gross 100.0000
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/users/list
verifyText id=balance_0 60.0000
verifyText id=balance_4 44.0000
verifyText id=balance_3 36.0000
verifyText id=balance_2 76.0000
open /billing/callc/logout
open /billing/api/create_payment?u=admin&p=admin1&user_id=3&p_currency=USD&amount=33&test=1&hash=053f9dfec5c64e7f5b8c352251235394d7d48fa0
waitForText css=status ok
verifyText css=payment_id 12
verifyText css=tax 0.0000
verifyText css=amount 33.0000
verifyText css=gross 33.0000
open /billing/api/create_payment?u=admin&p=admin1&user_id=3&p_currency=USD&amount=33&test=1&hash=053f9dfec5c64e7f5b8c352251235394d7d48fa0
verifyText css=status ok
verifyText css=payment_id 13
verifyText css=tax 0.0000
verifyText css=amount 33.0000
verifyText css=gross 33.0000
open /billing/api/create_payment?u=admin&p=admin1&user_id=3&p_currency=USD&amount=55&payer_email=$%^$&test=1&hash=4c0d1cbe72dff69350ebdc855b7e13070c221973
verifyText css=status ok
verifyText css=payment_id 14
verifyText css=tax 0.0000
verifyText css=amount 55.0000
verifyText css=gross 55.0000
open /billing/api/create_payment?u=admin&p=admin1&user_id=78yu&p_currency=USD&amount=55&payer_email=agser@dzbsr.er&test=1&hash=6a081bfedb11e06368a601a6325e59b574950fc4
waitForTextPresent Dont be so smart
open /billing/api/create_payment?u=admin&p=admin1&user_id=5&p_currency=USD&amount=55&payer_email=sdfg@sdfg.sd&tax_in_amount=1&test=1&hash=599d125dec2d2b4b5bc44aea4153cdf2d3172095
waitForTextPresent Dont be so smart
open /billing/api/create_payment?u=admin&p=admin1&user_id=3&p_currency=USD&amount=55&paymenttype=manual&transaction=12345678976543&test=1&hash=59cb152af1e93963c8edd3ae1707e8d79bf565d7
verifyText css=status ok
verifyText css=tax 0.0000
verifyText css=amount 55.0000
verifyText css=gross 55.0000
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/users/list
verifyText id=balance_0 60.0000
verifyText id=balance_4 44.0000
verifyText id=balance_3 212.0000
verifyText id=balance_2 76.0000
open /billing/test/test_api?user_id=0&amount=14&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543
waitForTextPresent 4da342086e9e9f3b0b50535f91c154bc9d6b644d
open /billing/callc/logout
open /billing/api/create_payment?u=reseller&p=reseller1&user_id=5&p_currency=USD&amount=55&payer_email=sdfg@sdfg.sd&tax_in_amount=1&test=1&hash=599d125dec2d2b4b5bc44aea4153cdf2d3172095
verifyText css=status ok
verifyText css=payment_id 16
verifyText css=tax -0.0000
verifyText css=amount 55.0000
verifyText css=gross 55.0000
open /billing/api/create_payment?u=reseller&p=resller1&user_id=3&p_currency=USD&amount=55&paymenttype=manual&transaction=12345678976543&test=1&hash=59cb152af1e93963c8edd3ae1707e8d79bf565d7
waitForTextPresent Bad login
open /billing/api/create_payment?u=reseller&p=reseller1&user_id=3&p_currency=USD&amount=55&paymenttype=manual&transaction=12345678976543&test=1&hash=59cb152af1e93963c8edd3ae1707e8d79bf565d7
waitForTextPresent Dont be so smart
open /billing/api/create_payment?u=reseller&p=reseller1&user_id=0&amount=14&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&test=1&hash=4da342086e9e9f3b0b50535f91c154bc9d6b644d
waitForTextPresent Dont be so smart
open /billing/api/create_payment?u=user_reseller&p=user_reseller1&user_id=5&p_currency=USD&amount=55&payer_email=sdfg@sdfg.sd&tax_in_amount=1&test=1&hash=599d125dec2d2b4b5bc44aea4153cdf2d3172095
waitForTextPresent Dont be so smart
open /billing/api/create_payment?u=user_reseller&p=user_reseller1&user_id=3&p_currency=USD&amount=55&paymenttype=manual&transaction=12345678976543&test=1&hash=59cb152af1e93963c8edd3ae1707e8d79bf565d7
waitForTextPresent Dont be so smart
open /billing/api/create_payment?u=user_reseller&p=user_reseller1&user_id=0&amount=14&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&test=1&hash=4da342086e9e9f3b0b50535f91c154bc9d6b644d
waitForTextPresent Dont be so smart
open /billing/api/create_payment?u=accountant&p=accountant1&user_id=5&p_currency=USD&amount=55&payer_email=sdfg@sdfg.sd&tax_in_amount=1&test=1&hash=599d125dec2d2b4b5bc44aea4153cdf2d3172095
waitForTextPresent Dont be so smart
open /billing/api/create_payment?u=accountant&p=accountant1&user_id=3&p_currency=USD&amount=55&paymenttype=manual&transaction=12345678976543&test=1&hash=59cb152af1e93963c8edd3ae1707e8d79bf565d7
verifyText css=status ok
verifyText css=payment_id 17
verifyText css=tax 0.0000
verifyText css=amount 55.0000
verifyText css=gross 55.0000
open /billing/api/create_payment?u=accountant&p=accountant1&user_id=0&amount=14&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&test=1&hash=4da342086e9e9f3b0b50535f91c154bc9d6b644d
verifyText css=status ok
verifyText css=payment_id 18
verifyText css=tax 0.0000
verifyText css=amount 14.0000
verifyText css=gross 14.0000
open /billing/callc/logout
type login_username reseller
type login_psw reseller1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/users/list
verifyText id=balance_5 55.0000
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/functions/settings
click css=#tabTabdhtmlgoodies_tabView1_5 > span
type id=tax1value 50.0
clickAndWait name=commit
waitForTextPresent Settings saved
open /billing/users/edit/2
type id=tax1_value 50.0
clickAndWait css=#confirm_without_message > input[name="commit"]
waitForTextPresent User's settings succesfully changed:
open /billing/users/edit/3
type id=tax1_value 50.0
clickAndWait css=#confirm_without_message > input[name="commit"]
waitForTextPresent User's settings succesfully changed:
open /billing/users/list
verifyText id=balance_3 239.5000
verifyText id=balance_4 44.0000
verifyText id=balance_0 67.0000
verifyText id=balance_2 76.0000
open /billing/test/test_api?user_id=2&amount=-14&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&tax_in_amount=1
waitForTextPresent 12368e8634ce83063bfa807fe8eeb5722d17e1f9
open /billing/test/test_api?user_id=3&amount=-105&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&tax_in_amount=0
waitForTextPresent 53e7db377c850ee43179609e61974e29b4e89108
open /billing/callc/logout
open /billing/api/create_payment?u=admin&p=admin1&user_id=2&amount=-14&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&tax_in_amount=1&test=1&hash=12368e8634ce83063bfa807fe8eeb5722d17e1f9
waitForTextPresent ok
verifyText css=tax -4.6667
verifyText css=amount -9.3333
verifyText css=gross -14.0000
open /billing/api/create_payment?u=admin&p=admin1&user_id=3&amount=-105&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&tax_in_amount=0&test=1&hash=53e7db377c850ee43179609e61974e29b4e89108
verifyText css=status ok
verifyText css=tax -52.5000
verifyText css=amount -105.0000
verifyText css=gross -157.5000
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/users/list
verifyText id=balance_0 67.0000
verifyText id=balance_4 44.0000
verifyText id=balance_3 134.5000
verifyText id=balance_2 66.6667
open /billing/functions/settings
click css=#tabTabdhtmlgoodies_tabView1_8 > span
click id=api_payment_confirmation
waitForValue id=api_payment_confirmation on
clickAndWait name=commit
waitForTextPresent Settings saved
open /billing/stats/action_log
verifyText id=type_31 payment: from_api :
verifyText id=type_40 payment: from_api : gateways_paypal
verifyText id=type_34 payment: from_api : manual
open /billing/payments/list
verifyText id=email_14 $%^$
verifyText id=transaction_15 12345678976543
verifyText id=paymenttype_15 From_api : manual
verifyText id=paymenttype_19 From_api : gateways_paypal
verifyText id=amount_20 -105.0000
verifyText id=amount_13 33.0000
verifyText id=amout_with_tax_17 55.0000
verifyText id=total_with_tax 123.5000(EGP)
verifyText id=currency_11 EUR
verifyText id=currency_17 USD
verifyText id=total_amount_completed 180.6667(EGP)
waitForText id=total_with_tax_completed 123.5000(EGP)
open /billing/test/test_api?user_id=3&amount=^&*&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&tax_in_amount=&&
waitForTextPresent 753c9f0ed6659a9bcd89eb9bee09f6ef4ebc9c65
open /billing/callc/logout
open /billing/api/create_payment?u=admin&p=admin1&user_id=3&amount=^&*&p_currency=USD&paymenttype=gateways_paypal&transaction=12345678976543&tax_in_amount=&&&test=1&hash=753c9f0ed6659a9bcd89eb9bee09f6ef4ebc9c65
waitForTextPresent ok 21 0.0000 0.0000 0.0000