文档链接:https ://developer.squareup.com/docs/pos-api/build-mobile-web#step-5-test-your-code建议如下直接代码:
<a href="intent:#Intent;
action=com.squareup.pos.action.CHARGE;
package=com.squareup;
S.browser_fallback_url=https://my.website.com/index.html;
S.com.squareup.pos.WEB_CALLBACK_URI=https://my.website.com/index.html;
S.com.squareup.pos.CLIENT_ID=sq0ids-yourClientId;
S.com.squareup.pos.API_VERSION=v2.0;
i.com.squareup.pos.TOTAL_AMOUNT=100;
S.com.squareup.pos.CURRENCY_CODE=USD;
S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD,com.squareup.pos.TENDER_CASH;
end">Start Transaction</a>
我测试了它,它没有打开任何链接,我的设备已经安装了应用程序。
当我尝试这段代码时:
<a href="intent://scan/#Intent;scheme=squareup.pos;action=com.squareup.pos.action.CHARGE;package=com.squareup;end"> Take a QR code 2 </a>
它打开带有squareup pos应用信息的play store应用,我需要直接打开应用而不是播放应用的商店屏幕,有什么办法吗?