저는 Square에 처음 왔으며 Tomcat/Eclipse/Firefox에서 간단한 SqPaymentForm을 사용하려고합니다. 양식이 나올 때 아래의로드 거부 오류가 발생합니다. iFrames는 데이터를 입력하고 게시 할 수 있으므로 작동하는 것 같습니다. 그러나 2 개의 오류가 발생했습니다.Squareup iFrame이 허용되지 않습니다.
양식이로드 될 때마다 다음 오류가 발생합니다. 기본 이클립스 tomcat web.xml과 웹 응용 프로그램의 web.xml에 보안 필터 설정을 포함하여 시도했습니다. 나도 안티 클릭 자르기를 끄는 시도했지만 그 중 하나를 작동하지 않았다. X-프레임-옵션에 의해 거부
모든 제안은 감사하겠습니다 ...
로드 : https://connect.squareup.com/v2/logo.html?s=MY-ID 간 원산지 프레임을 허용하지 않습니다.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<filter>
<filter-name>httpHeaderSecurity</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<async-supported>true</async-supported>
<init-param>
<param-name>antiClickJackingEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>antiClickJackingOption</param-name>
<param-value>SAMEORIGIN</param-value>
</init-param>
<init-param>
<param-name>antiClickJackingUri</param-name>
<param-value>https://connect.squareup.com</param-value>
</init-param>
</filter>
</web-app>
내가 얻는 두번째 오류는 다음과 같습니다
// This function is called when a buyer clicks the Submit button on the webpage to charge their card.
function requestCardNonce(event)
{
// This prevents the Submit button from submitting its associated form.
// Instead, clicking the Submit button should tell the SqPaymentForm to generate
// a card nonce, which the next line does.
event.preventDefault();
paymentForm.requestCardNonce();
}
물론 코드를 공유 할 수 있지만 여기에 파일을 업로드하는 방법을 잘 모르겠습니다. 간단한 HTML 웹 페이지가 있습니다. 그동안 Square의 개발자 사이트에서 직접 코드를 가져 왔습니다. 기본적으로 이벤트 매개 변수가 있습니다. 여기에 링크가 있습니다 : https://docs.connect.squareup.com/articles/adding-payment-form/?q=embed%20payment%20form – zappullae
그래, 파일에 버그가있는 것 같습니다. 그러나 지불 처리에는 문제가 없어야합니다. – tristansokol
도움을 주셔서 감사합니다. 이벤트가 버그입니까? 나는 nonce없이 트랜잭션을 처리 할 수 없으며 X-Frame 때문에 작업 할 수없는 SqPaymentForm에서 가져와야합니다. requestCardNonce (이벤트) – zappullae