Due to the nature of iOS "sandboxing", it's really not easy, and potentially impossible to do that.
There are existing apps like CardSwipe:
that can bridge the gap by using the FMP url scheme to pass data back and forth with FileMaker go. However you're limited to the merchant processor and hardward supported by CardSwipe.
Another method of doing it would be to create a "callback url" for stripe or paypal (not sure if paypal supports it, but stripe for sure does). Essentially whenever a card is processed by your merchant service, it sends transaction details to a URL that you specify. You then setup a page that uses CWP to write this data back into filemaker, matching to a record. Again, you're still generally disconnected from FileMaker go in doing this.
The last (theoretical, as I haven't seen anyone DO this), would be to use the FileMaker iOS SDK, and write your OWN integration for a lightning/microphone hardware adaptor that can read the credit card string, charge the card, and return the resultant data back to filemaker. Essentially this is the same as using something like CardStripe, but since you setup the URL response inside of the FileMaker iOS SDK, it never leaves your app. This is highly theoretical, as I'm not entirely certain you can put UI/UX customizations as part of your iOS SDK app in FMGo. I know you can create functions, but that's the extent of my knowledge.
I've solved, at least for now, my prime concern after discovering Shopify. Wish I had found this years ago.
Shopify does most things I want to do as far as having an ecommerce web site. I may find this to be less than true after I get into it but for now...
Shopify handles inventory, sales, credit cards, etc. All those things that I now hate to script...
If all goes well, I will still use FIleMaker to create a lot of documents that I will sell on Shopify...