I have an existing Rails API using ActionWebService that is used for
billing. I have been given a site written in PHP that accepts billing
information and now needs to submit this information to the
ActionWebService API. I need to know how I can submit billing
information from the PHP site to the Rails ActionWebService. Any
insights on how to make this work (links to other places, other
suggestions, etc.) would be appreciated.
This is the basic wiring of the API:
class CustomerChangeAPI < ActionWebService::API::Base
class ServerResponse < ActionWebService::Struct
member :successful, :bool
member :error_message, :string
end
class NewCustomerResponse < ServerResponse
member :uid, :int
end
class NewCreditCardResponse < ServerResponse
member :cardid, :int
end
...
end
api_method :new_customer, :expects => [{'company_name'=>:string},
{'lead_sourceid'=>:int}], :returns => [NewCustomerResponse]
api_method :new_credit_card, :expects => [{'uid'=>:int},
{'name_on_card'=>:string}, {'card_number'=>:string},
{'exp_date'=>:date}, {'billing_address'=>:string},
{'billing_zip'=>:string}, {'accountid'=>:int}], :returns =>
[NewCreditCardResponse]
end
on 18.08.2008 20:05
on 18.08.2008 20:19
On 18 Aug 2008, at 19:04, Matt White wrote: > > I have an existing Rails API using ActionWebService that is used for > billing. I have been given a site written in PHP that accepts billing > information and now needs to submit this information to the > ActionWebService API. I need to know how I can submit billing > information from the PHP site to the Rails ActionWebService. Any > insights on how to make this work (links to other places, other > suggestions, etc.) would be appreciated. > > This is the basic wiring of the API: Read up on php's SOAP clients. ActionWebService will generate a wsdl for you Fred
on 19.08.2008 18:16
On Aug 18, 12:17 pm, Frederick Cheung <frederick.che...@gmail.com> wrote: > > suggestions, etc.) would be appreciated. > > > This is the basic wiring of the API: > > Read up on php's SOAP clients. ActionWebService will generate a wsdl > for you > > Fred Excuse my ignorance but how do I get ActionWebService to generate the WSDL? Any simple examples that I can see somewhere? Thanks.
on 19.08.2008 18:34
On 19 Aug 2008, at 17:15, Matt White wrote: >>> billing. I have been given a site written in PHP that accepts >> for you >> >> Fred > > Excuse my ignorance but how do I get ActionWebService to generate the > WSDL? Any simple examples that I can see somewhere? Thanks. go to localhost:3000/customer_change/wsdl (assuming the corresponding controller is customer_change) Fred