app/models/solidus/gateway/culqi_gateway.rb in solidus_culqi-0.1.0 vs app/models/solidus/gateway/culqi_gateway.rb in solidus_culqi-0.1.1

- old
+ new

@@ -51,10 +51,11 @@ true end def create_profile(payment) return unless payment.source.gateway_customer_profile_id.nil? + init_culqi customer = get_customer(payment) token = payment.source.gateway_payment_profile_id card_token = generate_card(customer, token) unless customer.nil? || card_token.nil? @@ -88,11 +89,11 @@ end def parse_response(response) res = JSON.parse(response) ActiveMerchant::Billing::Response.new( - res[:object] != "error", - res[:merchant_message], + res["object"] != "error", + res["merchant_message"], res, authorization: res["id"] ) end