lib/mpower/checkout/invoice.rb in mpower-1.0.4 vs lib/mpower/checkout/invoice.rb in mpower-1.0.5
- old
+ new
@@ -38,11 +38,11 @@
}
})
end
def add_custom_data(key,value)
- @custom_data[key] = value
+ @custom_data["#{key}"] = value
end
def get_items
hash_to_json @items
end
@@ -54,11 +54,11 @@
def get_customer_info(key)
@customer["#{key}"]
end
def get_custom_data(key)
- @custom_data["#{name}"]
+ @custom_data["#{key}"]
end
def confirm(token)
result = http_get_request("#{MPower::Setup.checkout_confirm_base_url}#{token}");
if result.size > 0
@@ -105,9 +105,10 @@
:postal_address => @store.postal_address,
:phone => @store.phone_number,
:logo_url => @store.logo_url,
:website_url => @store.website_url
},
+ :custom_data => @custom_data,
:actions => {
:cancel_url => @cancel_url,
:return_url => @return_url
}
}
\ No newline at end of file