lib/ideal-mollie.rb in ideal-mollie-0.0.4 vs lib/ideal-mollie.rb in ideal-mollie-0.0.5

- old
+ new

@@ -65,11 +65,11 @@ # # @example # IdealMollie.check_order("4b99662febb42ce6f889d9c57f5cf3fa") # # @note Once a transaction is paid, only the next time you verify the - # transaction will the value of +payed+ be +true+. + # transaction will the value of +paid+ be +true+. # Else it will be +false+. # # @return [IdealMollie::OrderResult] the +OrderResult+. def self.check_order(transaction_id) response = IdealMollie.request("check", { @@ -117,17 +117,23 @@ # @param [String] return_url Optional override of the return url specified in the Config # # @return [Hash] the parameter +Hash+ for the new order. def new_order_params(amount, description, bank_id, return_url=nil) return_url = Config.return_url if return_url.nil? - { + params = { :partnerid => Config.partner_id, :reporturl => Config.report_url, :returnurl => return_url, :description => description, :amount => amount, :bank_id => bank_id } + + unless Config.profile_key.nil? + params.merge!({:profile_key => Config.profile_key}) + end + + params end private def connection