철 php 에서 success페이지내 오류 문의 php 에 서 결 재 연 동 중 success 페 이 지 에 서 "Call to undefined function : curl _setopt _array ( ) " 이 런 에 러 가 발 생 하 고 있 습 니 다 . php5 이 상 에 서 지 원 하 는 함 수 까 지 는 찾 았 는 데 사 용 하 는 php 버 전 이 4 버 전 으 로 위 함 수 를 사 용 할 수 없 는 데 다 른 방 법 이 있 을 까 요 ? < ?php $paymentKey = $ _GET [ 'paymentKey ' ] ; $orderId = $ _GET [ 'orderId ' ] ; $amount = $ _GET [ 'amount ' ] ; $secretKey = 'test _ak _ZORzdMaqN3wQd5k6ygr5AkYXQGwy ' ; / / $url = ' https://api.tosspayments.com/v1/payments/ ' . $paymentKey ; $url = ' https://api.tosspayments.com/v1/payments/confirm ' ; $data = array ( 'orderId ' = > $orderId , 'amount ' = > $amount ) ; $credential = base64 _encode ( $secretKey . ' : ' ) ; $curlHandle = curl _init ( $url ) ; curl _setopt _array ( $curlHandle , array ( CURLOPT _POST = > TRUE , CURLOPT _RETURNTRANSFER = > TRUE , CURLOPT _HTTPHEADER = > array ( 'Authorization : Basic ' . $credential , 'Content -Type : application /json ' ) , CURLOPT _POSTFIELDS = > json _encode ( $data ) ) ) ; $response = curl _exec ( $curlHandle ) ; $httpCode = curl _getinfo ( $curlHandle , CURLINFO _HTTP _CODE ) ; $isSuccess = $httpCode = = 200 ; $responseJson = json _decode ( $response ) ; ? >
Toss payments 개발자 커뮤니티입니다. 결제 연동하며 겪는 기술 문의부터, 결제 시장에 대한 다양한 정보까지 얻어가세요~ 15,588 Members
View on DiscordResources
ModelContextProtocol ModelContextProtocol MCP Server