とlogger.info response.inspect
私は得る:
#<ActiveMerchant::Billing::AdaptivePaymentResponse:0x0000000599dc48 @json="{\"responseEnvelope\":{\"timestamp\":\"2012-09-24T04:34:36.888-07:00\",\"ack\":\"Failure\",\"correlationId\":\"22d02b45ed143\",\"build\":\"3692562\"},\"error\":[{\"errorId\":\"540031\",\"domain\":\"PLATFORM\",\"subdomain\":\"Application\",\"severity\":\"Error\",\"category\":\"Application\",\"message\":\"You do not have permission to issue this refund\"}]}", @response=#<Hashie::Rash error=[#<Hashie::Rash category="Application" domain="PLATFORM" error_id="540031" message="You do not have permission to issue this refund" severity="Error" subdomain="Application">] response_envelope=#<Hashie::Rash ack="Failure" build="3692562" correlation_id="22d02b45ed143" timestamp="2012-09-24T04:34:36.888-07:00">>, @xml_request="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<RefundRequest>\n <requestEnvelope>\n <detailLevel>ReturnAll</detailLevel>\n <errorLanguage>en_US</errorLanguage>\n </requestEnvelope>\n <actionType>REFUND</actionType>\n <payKey>AP-2JV97573KK140871P</payKey>\n <currencyCode>USD</currencyCode>\n <feesPayer>EACHRECEIVER</feesPayer>\n</RefundRequest>\n", @request={"RefundRequest"=>{"requestEnvelope"=>{"detailLevel"=>"ReturnAll", "errorLanguage"=>"en_US"}, "actionType"=>"REFUND", "payKey"=>"AP-2JV97573KK140871P", "currencyCode"=>"USD", "feesPayer"=>"EACHRECEIVER"}}, @action="Refund">
私はresponse.ack
得る"Failure"
私が書くと、次のようlogger.info response.error.inspect
になります。
[#<Hashie::Rash category="Application" domain="PLATFORM" error_id="540031" message="You do not have permission to issue this refund" severity="Error" subdomain="Application">]
たとえば、error_id
値にアクセスまたは取得するにはどうすればよいですか?
ありがとうございました!