lib/pesapal/helper/details.rb in pesapal-1.8.0 vs lib/pesapal/helper/details.rb in pesapal-2.0.0
- old
+ new
@@ -41,13 +41,15 @@
#
# @return [Hash] parameters to be used in generating the oAuth 1.0 URL
# query parameters and the `oauth_signature` itself.
def self.set_parameters(consumer_key, merchant_reference, transaction_tracking_id)
timestamp = Time.now.to_i.to_s
- { oauth_consumer_key: consumer_key,
- oauth_nonce: "#{timestamp}" + Pesapal::Oauth.generate_nonce(12),
+
+ {
+ oauth_consumer_key: consumer_key,
+ oauth_nonce: timestamp + Pesapal::Oauth.generate_nonce(12),
oauth_signature_method: 'HMAC-SHA1',
- oauth_timestamp: "#{timestamp}",
+ oauth_timestamp: timestamp,
oauth_version: '1.0',
pesapal_merchant_reference: merchant_reference,
pesapal_transaction_tracking_id: transaction_tracking_id
}
end