This shows you the differences between two versions of the page.
ors-soap-api:public:option_fix [2015/01/24 16:40] |
ors-soap-api:public:option_fix [2015/01/24 16:40] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Option Fix method ====== | ||
+ | This method will fix an option (option will became a booking without waiting for a timeout). Use this method also when using online payment, after you get confirmation that a payment was successful. | ||
+ | |||
+ | This method supports only some of the touroperators, so please check first with ORS if you can use this method. | ||
+ | |||
+ | ===== Valid content types ===== | ||
+ | |||
+ | * ''pauschal'' | ||
+ | * ''hotel'' | ||
+ | * ''trips'' | ||
+ | * ''charter'' | ||
+ | * ''oneway'' | ||
+ | * ''extras'' | ||
+ | |||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | <code php> | ||
+ | public array option_fix( array $searchData, array $headerData, boolean $testMode = false ) | ||
+ | </code> | ||
+ | |||
+ | |||
+ | ===== Parameters ===== | ||
+ | |||
+ | * ''searchData (array)'' : required parameters are: ''bkc'', ''prc'', ''toc'' | ||
+ | * ''headerData (array)'' : [[soap_header|SOAP Header Information]] | ||
+ | * ''testMode (bool)'' : experimental parameter! | ||
+ | |||
+ | |||
+ | ===== Return Values ===== | ||
+ | |||
+ | Returns booking status and information. Same as [[book_info|book_info]]. | ||
+ | |||
+ | |||
+ | ===== Return parameters ===== | ||
+ | |||
+ | Check [[book_info|book_info]] for return parameters. | ||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | * Example of option_fix | ||
+ | |||
+ | <code php> | ||
+ | $searchParams = array( | ||
+ | 'prc' => '1132503', // booking number | ||
+ | 'bkc' => '20140817184817163', // ORS internal booking number | ||
+ | 'toc' => 'ABC', // touroperator code | ||
+ | ); | ||
+ | |||
+ | $results = $soapClient->orsxml_hotel_api_call( 'option_fix', $searchParams, $headerData ); | ||
+ | </code> | ||
+ | |||
+ | * Example of option_fix with credit card payment information | ||
+ | |||
+ | <code php> | ||
+ | $searchParams = array( | ||
+ | 'prc' => '1132503', // booking number | ||
+ | 'bkc' => '20140817184817163', // ORS internal booking number | ||
+ | 'toc' => 'ABC', // touroperator code | ||
+ | | ||
+ | // this information are from payment gateway response. It's possible that some payment gateways won't have the same return parameters. This parameters are not required! | ||
+ | 'paymentid' => '12345678', // payment ID | ||
+ | 'transid' => '56574345', // transaction ID | ||
+ | 'trackid' => '1132503', // track ID (this is usually the same as booking number for tracking payment) | ||
+ | 'resultcode' => 'CAPTURED', // result code (different gateways can have different result codes) | ||
+ | 'auth' => '0492xs', // unique authentication code | ||
+ | 'cardtype' => 'VI', // credit card type (VI - visa, MC - mastercard, ...) | ||
+ | 'payment_method' => 'cc', // Payment method: 'cc' - credit card, 'paypal' - PayPal, 'upn' - wire transfer | ||
+ | ); | ||
+ | |||
+ | $results = $soapClient->orsxml_hotel_api_call( 'option_fix', $searchParams, $headerData ); | ||
+ | </code> |