lib/braintree/transaction_gateway.rb in braintree-2.49.0 vs lib/braintree/transaction_gateway.rb in braintree-2.50.0
- old
+ new
@@ -102,10 +102,16 @@
raise ArgumentError, "transaction_id is invalid" unless transaction_id =~ /\A[0-9a-z]+\z/
response = @config.http.put("#{@config.base_merchant_path}/transactions/#{transaction_id}/submit_for_settlement", :transaction => {:amount => amount})
_handle_transaction_response(response)
end
+ def submit_for_partial_settlement(authorized_transaction_id, amount = nil)
+ raise ArgumentError, "authorized_transaction_id is invalid" unless authorized_transaction_id =~ /\A[0-9a-z]+\z/
+ response = @config.http.post("#{@config.base_merchant_path}/transactions/#{authorized_transaction_id}/submit_for_partial_settlement", :transaction => {:amount => amount})
+ _handle_transaction_response(response)
+ end
+
def void(transaction_id)
response = @config.http.put("#{@config.base_merchant_path}/transactions/#{transaction_id}/void")
_handle_transaction_response(response)
end
@@ -118,10 +124,11 @@
[
:amount, :customer_id, :merchant_account_id, :order_id, :channel, :payment_method_token,
:purchase_order_number, :recurring, :shipping_address_id, :type, :tax_amount, :tax_exempt,
:venmo_sdk_payment_method_code, :device_session_id, :service_fee_amount, :device_data, :fraud_merchant_id,
:billing_address_id, :payment_method_nonce, :three_d_secure_token,
+ :shared_payment_method_token, :shared_billing_address_id, :shared_customer_id, :shared_shipping_address_id,
{:credit_card => [:token, :cardholder_name, :cvv, :expiration_date, :expiration_month, :expiration_year, :number]},
{:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]},
{
:billing => AddressGateway._shared_signature
},
@@ -142,10 +149,11 @@
{:amex_rewards => [:request_id, :points, :currency_amount, :currency_iso_code]}]
},
{:custom_fields => :_any_key_},
{:descriptor => [:name, :phone, :url]},
{:paypal_account => [:email, :token, :paypal_data, :payee_email]},
- {:industry => [:industry_type, {:data => [:folio_number, :check_in_date, :check_out_date, :travel_package, :lodging_check_in_date, :lodging_check_out_date, :departure_date, :lodging_name, :room_rate]}]}
+ {:industry => [:industry_type, {:data => [:folio_number, :check_in_date, :check_out_date, :travel_package, :lodging_check_in_date, :lodging_check_out_date, :departure_date, :lodging_name, :room_rate]}]},
+ {:apple_pay_card => [:number, :cardholder_name, :cryptogram, :expiration_month, :expiration_year]}
]
end
def _do_create(path, params=nil) # :nodoc:
response = @config.http.post("#{@config.base_merchant_path}#{path}", params)