모바일웹 환경 결제 연동 시 스킴 오류가 나는것 같아요
html head부분에
<script src="https://js.tosspayments.com/v2/standard"></script>
sdk추가 했고 바디 안의 스크립트 부분에서
const tossPayments = TossPayments(clientKey);
const payment = tossPayments.payment({customerKey: TossPayments.ANONYMOUS})
async function startPayment(method) {
if (!validate()) return;
const amt = Number(document.getElementById("payAmt").value);
const prd = document.getElementById("payPrd").value;
const name = document.getElementById("payName").value.trim();
const phone = document.getElementById("payPhone").value.trim();
const email = document.getElementById("payMail").value.trim();
const orderId = generateKey();
await payment.requestPayment({
method: method,
amount: {
currency: "KRW",
value: amt,
},
orderId: orderId,
orderName: prd,
customerName: name,
customerMobilePhone: phone,
customerEmail: email,
successUrl:
failUrl:
});
}
이렇게 결제창을 열고 있습니다. 결제창을 연 후 토스간편결제 등에서 다음을 누르면
Failed to launch 'supertoss://pay?payToken=Vq3YsLQG22xUO8QXnek17f&appPayVersion=2.0' because the scheme does not have a registered handler
이렇게 콘솔에 찍히며 앱으로 알림이 오지 않습니다.
모바일 디바이스에서만 동작하나요?
<script src="https://js.tosspayments.com/v2/standard"></script>
sdk추가 했고 바디 안의 스크립트 부분에서
const tossPayments = TossPayments(clientKey);
const payment = tossPayments.payment({customerKey: TossPayments.ANONYMOUS})
async function startPayment(method) {
if (!validate()) return;
const amt = Number(document.getElementById("payAmt").value);
const prd = document.getElementById("payPrd").value;
const name = document.getElementById("payName").value.trim();
const phone = document.getElementById("payPhone").value.trim();
const email = document.getElementById("payMail").value.trim();
const orderId = generateKey();
await payment.requestPayment({
method: method,
amount: {
currency: "KRW",
value: amt,
},
orderId: orderId,
orderName: prd,
customerName: name,
customerMobilePhone: phone,
customerEmail: email,
successUrl:
https://www.narma.co.kr/payment-success?pay=success&orderId=${orderId}&amount=${amt}&rc=test-site,failUrl:
https://www.narma.co.kr/payment-success?pay=fail&rc=test-site});
}
이렇게 결제창을 열고 있습니다. 결제창을 연 후 토스간편결제 등에서 다음을 누르면
Failed to launch 'supertoss://pay?payToken=Vq3YsLQG22xUO8QXnek17f&appPayVersion=2.0' because the scheme does not have a registered handler
이렇게 콘솔에 찍히며 앱으로 알림이 오지 않습니다.
모바일 디바이스에서만 동작하나요?
