@@ -755,6 +755,7 @@ def add_payment_profile(xml, payment_profile)
755755 add_credit_card ( xml , payment_profile [ :payment ] [ :credit_card ] ) if payment_profile [ :payment ] . has_key? ( :credit_card )
756756 add_bank_account ( xml , payment_profile [ :payment ] [ :bank_account ] ) if payment_profile [ :payment ] . has_key? ( :bank_account )
757757 add_drivers_license ( xml , payment_profile [ :payment ] [ :drivers_license ] ) if payment_profile [ :payment ] . has_key? ( :drivers_license )
758+ add_acceptjs ( xml , payment_profile [ :payment ] [ :acceptjs ] ) if payment_profile [ :payment ] . has_key? ( :acceptjs )
758759 # This element is only required for Wells Fargo SecureSource eCheck.Net merchants
759760 # The customer's Social Security Number or Tax ID
760761 xml . tag! ( 'taxId' , payment_profile [ :payment ] ) if payment_profile [ :payment ] . has_key? ( :tax_id )
@@ -764,6 +765,16 @@ def add_payment_profile(xml, payment_profile)
764765 xml . tag! ( 'customerPaymentProfileId' , payment_profile [ :customer_payment_profile_id ] ) if payment_profile [ :customer_payment_profile_id ]
765766 end
766767
768+ def add_acceptjs ( xml , data_value )
769+ return unless data_value
770+ xml . tag! ( 'opaqueData' ) do
771+ # The credit card number used for payment of the subscription
772+ xml . tag! ( 'dataDescriptor' , "COMMON.ACCEPT.INAPP.PAYMENT" )
773+ # The expiration date of the credit card used for the subscription
774+ xml . tag! ( 'dataValue' , data_value [ :data_value ] )
775+ end
776+ end
777+
767778 def add_ship_to_list ( xml , ship_to_list )
768779 xml . tag! ( 'shipToList' ) do
769780 add_address ( xml , ship_to_list )
0 commit comments