lib/active_merchant/billing/gateways/paypal_express.rb in activemerchant-1.58.0 vs lib/active_merchant/billing/gateways/paypal_express.rb in activemerchant-1.59.0
- old
+ new
@@ -24,16 +24,15 @@
'CN' => 'zh_CN',
'HK' => 'zh_HK',
'TW' => 'zh_TW'
}
- CURRENCIES_WITHOUT_FRACTIONS = %w(HUF JPY TWD)
-
self.test_redirect_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'
self.supported_countries = ['US']
self.homepage_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=xpt/merchant/ExpressCheckoutIntro-outside'
self.display_name = 'PayPal Express Checkout'
+ self.currencies_without_fractions = %w(HUF JPY TWD)
def setup_authorization(money, options = {})
requires!(options, :return_url, :cancel_return_url)
commit 'SetExpressCheckout', build_setup_request('Authorization', money, options)
@@ -84,13 +83,9 @@
commit 'DoReferenceTransaction', build_reference_transaction_request('Sale', money, options)
end
private
- def non_fractional_currency?(currency)
- CURRENCIES_WITHOUT_FRACTIONS.include?(currency.to_s)
- end
-
def build_get_details_request(token)
xml = Builder::XmlMarkup.new :indent => 2
xml.tag! 'GetExpressCheckoutDetailsReq', 'xmlns' => PAYPAL_NAMESPACE do
xml.tag! 'GetExpressCheckoutDetailsRequest', 'xmlns:n2' => EBAY_NAMESPACE do
xml.tag! 'n2:Version', API_VERSION