D
dpenney
So here is the snippet that defines the DoDirectPaymentRequestType
(this is all trying to use the PayPal API)
# {urn:ebay:apiayPalAPI}DoDirectPaymentRequestType
class DoDirectPaymentRequestType
@@schema_type = "DoDirectPaymentRequestType"
@@schema_ns = "urn:ebay:apiayPalAPI"
@@schema_element = [
["detailLevel", ["DetailLevelCodeType[]",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]],
["errorLanguage", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]],
["messageID", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]],
["version", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]],
["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema",
"anyType")]],
["doDirectPaymentRequestDetails",
["DoDirectPaymentRequestDetailsType",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents",
"DoDirectPaymentRequestDetails")]]
]
attr_accessor :detailLevel
attr_accessor :errorLanguage
attr_accessor :messageID
attr_accessor :version
attr_reader :__xmlele_any
attr_accessor :doDirectPaymentRequestDetails
The code to access it is
def Paypal.directauth(params,live=nil)
client = create_client(live)
directreq = DoDirectPaymentReq.new
drtype = DoDirectPaymentRequestType.new
directreq.doDirectPaymentRequest = drtype
drtype.version= "2.0"
dtype = DoDirectPaymentRequestDetailsType.new
dtype.iPAddress = params[:ip]
But all I get is
test_failed_authorization(PaypalTest):
NoMethodError: undefined method `version=' for
#<DoDirectPaymentRequestType:0x3a
20c60>
C:/ruby/store/vendor/plugins/paypal/test/../lib/paypal.rb:186:in
`directauth
'
What am I doing wrong here?
(this is all trying to use the PayPal API)
# {urn:ebay:apiayPalAPI}DoDirectPaymentRequestType
class DoDirectPaymentRequestType
@@schema_type = "DoDirectPaymentRequestType"
@@schema_ns = "urn:ebay:apiayPalAPI"
@@schema_element = [
["detailLevel", ["DetailLevelCodeType[]",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]],
["errorLanguage", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]],
["messageID", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]],
["version", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]],
["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema",
"anyType")]],
["doDirectPaymentRequestDetails",
["DoDirectPaymentRequestDetailsType",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents",
"DoDirectPaymentRequestDetails")]]
]
attr_accessor :detailLevel
attr_accessor :errorLanguage
attr_accessor :messageID
attr_accessor :version
attr_reader :__xmlele_any
attr_accessor :doDirectPaymentRequestDetails
The code to access it is
def Paypal.directauth(params,live=nil)
client = create_client(live)
directreq = DoDirectPaymentReq.new
drtype = DoDirectPaymentRequestType.new
directreq.doDirectPaymentRequest = drtype
drtype.version= "2.0"
dtype = DoDirectPaymentRequestDetailsType.new
dtype.iPAddress = params[:ip]
But all I get is
test_failed_authorization(PaypalTest):
NoMethodError: undefined method `version=' for
#<DoDirectPaymentRequestType:0x3a
20c60>
C:/ruby/store/vendor/plugins/paypal/test/../lib/paypal.rb:186:in
`directauth
'
What am I doing wrong here?