lib/einvoice/tradevan/provider.rb in einvoice-1.1.0 vs lib/einvoice/tradevan/provider.rb in einvoice-1.1.1

- old
+ new

@@ -96,11 +96,11 @@ response = connection( ssl: { verify: false } ).get do |request| - request.url endpoint_url || endpoint + "/DEFAULTAPI/get/sendCardInfotoCust" + request.url endpoint_url || endpoint + "/DEFAULTAPI/get/getInvoiceMarkInfo" request.params[:v] = encrypted_params(payload) end.body Einvoice::Tradevan::Result.new(response) end @@ -153,10 +153,10 @@ cipher.padding = 0 # padding with "\u0000" q, m = content.bytesize.divmod(cipher.block_size) content_bytes_with_padding = content.bytes.fill(0, content.bytesize..(cipher.block_size * (q + 1) - 1)) - content = content_bytes_with_padding.pack('C*').force_encoding('utf-8') if m!= 0 + content = content_bytes_with_padding.pack('C*').force_encoding('utf-8') if m!= 0 || q == 0 Base64.strict_encode64(cipher.update(content) + cipher.final) end end end