Код воспламенитель выплевывает:
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEST, `cardNumber` = 411111........11, `cardExpiry` = 1212, `authCode` = 110200,' at line 1
UPDATE `pxpayRequest` SET `status` = 'approved', `cardName` = Visa, `cardHolder` = VISA TEST, `cardNumber` = 411111........11, `cardExpiry` = 1212, `authCode` = 110200, `dpsTxnRef` = 0000000800b51dde, `dpsMessage` = APPROVED WHERE `id` = 1
И, как очевидно, это связано с отсутствием наборов '
Почему воспламенитель кода неправильно их вводит?
Вот мой код:
$id = $result->MerchantReference;
$cardName = $result->CardName;
$cardHolder = $result->CardHolderName;
$cardNumber = $result->CardNumber;
$cardExpiry = $result->DateExpiry;
$authCode = $result->AuthCode;
$dpsRef = $result->DpsTxnRef;
$dpsMessage = $result->ResponseText;
$this->db->set('status', 'approved')
->set('cardName', $cardName)
->set('cardHolder', $cardHolder)
->set('cardNumber', $cardNumber)
->set('cardExpiry', $cardExpiry)
->set('authCode', $authCode)
->set('dpsTxnRef', $dpsRef)
->set('dpsMessage', $dpsMessage)
->where('id', $id)
->update('pxpayRequest');
Вы можете увидеть связанные значения, посмотрев на запрос выше.
Вот результат print_r
из $
SimpleXMLElement Object
(
[@attributes] => Array
(
[valid] => 1
)
[Success] => 1
[TxnType] => Purchase
[CurrencyInput] => NZD
[MerchantReference] => 1
[TxnData1] => SimpleXMLElement Object
(
)
[TxnData2] => SimpleXMLElement Object
(
)
[TxnData3] => SimpleXMLElement Object
(
)
[AuthCode] => 121132
[CardName] => Visa
[CardHolderName] => VISA CARD
[CardNumber] => 411111........11
[DateExpiry] => 1212
[ClientInfo] => 125.236.220.238
[TxnId] => 4ddd9aa1dd14c
[EmailAddress] => SimpleXMLElement Object
(
)
[DpsTxnRef] => 0000000800b5d3c9
[BillingId] => SimpleXMLElement Object
(
)
[DpsBillingId] => SimpleXMLElement Object
(
)
[AmountSettlement] => 8.00
[CurrencySettlement] => NZD
[DateSettlement] => 20110526
[TxnMac] => BD43E619
[ResponseText] => APPROVED
[CardNumber2] => SimpleXMLElement Object
(
)
[IssuerCountryId] => 0
)