Class: LazerPayModule::Payment

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/lazerpay/main_module.rb

Instance Method Summary collapse

Constructor Details

#initializePayment

Returns a new instance of Payment.



18
# File 'lib/lazerpay/main_module.rb', line 18

def initialize; end

Instance Method Details



38
39
40
41
42
# File 'lib/lazerpay/main_module.rb', line 38

def get_donation_link payload
    response = Agent.post( "/payment_links/donation", { secret_key: @@sk, public_key: @@pk, data: payload } );

    return response.to_h;
end


32
33
34
35
36
# File 'lib/lazerpay/main_module.rb', line 32

def get_standard_link payload
    response = Agent.post( "/payment_links/standard", { secret_key: @@sk, public_key: @@pk, data: payload } );

    return response.to_h;
end

#init(payload) ⇒ Object



20
21
22
23
24
# File 'lib/lazerpay/main_module.rb', line 20

def init payload
    response = Agent.post( "/transaction/initialize", { secret_key: @@sk, public_key: @@pk, data: payload } );

    return response.to_h;
end

#verify(reference) ⇒ Object



26
27
28
29
30
# File 'lib/lazerpay/main_module.rb', line 26

def verify reference
    response = Agent.get( "/transaction/verify", { secret_key: @@sk, public_key: @@pk, route_parameter: reference } );

    return response.to_h;
end