Web POS cancel results in undefined URL - square

I have build a web application which runs in the browser on an Android device. The URL to launch the square POS app is as follows:
intent:#Intent;action=com.squareup.pos.action.CHARGE;package=com.squareup;S.com.squareup.pos.WEB_CALLBACK_URI="+callbackUrl+";S.com.squareup.pos.CLIENT_ID="+clientId+";S.com.squareup.pos.API_VERSION=v2.0;i.com.squareup.pos.TOTAL_AMOUNT=100;S.com.squareup.pos.CURRENCY_CODE=AUD;S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD;S.com.squareup.pos.NOTE="+orderId+";S.com.squareup.pos.REQUEST_METADATA="+orderId+";l.com.squareup.pos.AUTO_RETURN_TIMEOUT_MS=3200;end
The square POS app launches as expected. I can process a payment through the POS app and upon a successful transaction it switches to the browser and loads the callback url. This is all working well.
However, if I click on the link above to open the square POS app and then hit the cancel [x] button in the square POS app it bumps back to the browser and then reloads the URL with an undefined parameter.
E.g. the original URL is https://localhost:1337/admin/#/order/pay/f2kw0oFYNG
Then I launch the square POS app via the intent url. When if I hit cancel in the square POS app, when it switches to the browser it loads:
https://localhost:1337/admin/#/order/pay/undefined

Although you answered it yourself in the comments, it looks like the issues was the result of having a cached version of your link being used.
Just for clarity for anyone coming across this:
The callback URL should always be called at the end of the transaction.
For example: A cancelled transaction would return http://URL/PATH?com.squareup.pos.ERROR_CODE=com.squareup.pos.ERROR_TRANSACTION_CANCELED&com.squareup.pos.ERROR_DESCRIPTION=The%20transaction%20was%20canceled if the merchant had cancelled the transaction.

Related

sync mobile app with back end to check user update in flutter

recently i develop flutter app that each time after validate if user subscribe to app, should download all content to user phone that user could use content event in offline mode and check what is last state of user send to back end for next time that user open app. my problem is when user subscribe and receive content for next time application does not check if some thing new add.and at the same time does not send last state of user to back end. in dev mode everything is fine but in production nothings works does any one knows what happen and, I thinks maybe it depend on server deployment but i'm not sure? could you please help me.

Why does my automated Blue Prism process fail in some stages in scheduler-mode, when these steps work totally fine in debug-mode?

For example I implemented a stage "Activate Application" that works in debug mode perfectly, but fails when I use schedule-mode or when I simply drag and drop the process on a runtime resource.
A second example that fails: I implemented an action called "Navigate to URL". These action sets the URL from the input variable In_URL firstly in the URL bar in browser Google Chrome. Then the URL bar is focused and the enter button is hit in the last stage.
In schedule mode the following error appeared:
ERROR: Internal : Failed to perform step 1 in Navigate Stage 'Click URL Field' on page 'Navigate to URL' - Could not identify process owning the current foreground window
Actually there is only one Google Chrome window, so I don't understand why it says these error message.
These issues are typically due to either Windows being locked, or using RDP to connect to the resources (RDP does not work well with Blue Prism). In both cases, the desktop will not be active, so any active accessibility or region elements will fail.

Closing a Tab from a Safari App Extension

I am having a surprisingly hard time finding a way to close a tab from a Safari App Extension.
I can open a tab with
SFSafariApplication.getActiveWindow(completionHandler: {
$0?.openTab(with: url, makeActiveIfPossible: true)
})
Yet neither the returned SFSafariTab, nor the SFSafariWindow have close() (or performClose()).
I can send a friendly message to the JS side of the extension and run window.close();, but this is limited to tabs that were also created via Javascript. Any tabs opened by the user, or target="_blank" are blocked off.
The third option seems to be the deprecated Safari JS Extension API. I have not yet succeeded in making this work, and it feels icky to invest time into such a dead end.
Now in safari 12.1 have facility to close current tab.
/// Closes this tab. If this is the last tab in its window, the window is also closed.
- (void)close SF_AVAILABLE_MAC_SAFARI(12_1);

react-native-fbsdk close button returning postId = null instead of isCancelled = true

There appears to be a bug when clicking the inner close button of the ShareDialog, resolving the promise with {postId: null} instead of {isCancelled: true}
This only happens when selecting the inner close button. The outer button works fine.
Multiple button example:
The links are successfully shared though but do not return a postId(always null). Currently I can't determine whether someone closed the dialog or made a successful share...
To make matters stranger, everything works fine - closing the dialog with either button and also returning a valid postId - when using the LoginManager with the "publish_actions" permission and loading the ShareDialog afterwards.
However, Facebook deems the "publish_actions" permission unnecessary when using the ShareDialog.
The problem occurs in my own app and also the sample app found here: https://github.com/facebook/react-native-fbsdk/tree/master/sample/HelloFacebook
Other details:
react-native 0.45.0
react-native-fbsdk 0.6.0
android facebook sdk 4.22.1
problems occurs on emulator and physical device
Looks like this behaviour is part of the android sdk and not a bug. The onSuccess callback is called on closing the share dialog(why I don't know) and also a successful share.
https://developers.facebook.com/bugs/890116221030179/
So if you need to determine whether a post has been shared it looks like the "publish_actions" permission is needed.

get url event on app open in objective c (Mac OSX)

I'm writing a very lightweight app for OSX 10.6+ which will respond to a user clicking on a URL, pass that URL to another application via TCP and then exit.
So far it has registered fine to launch when a user clicks the custom url scheme. However the event seems to get lost if the app is not already running. So the users clicks the link, the app loads, but nothing happens. Once the app is running, if the user clicks the link then it grabs the event and processes it as normal.
What do I need to do to catch that initial event that causes the app to open in the first place?
Currently I'm creating the NSAppleEventManager in the applicationDidFinishLaunching method, and this works for all events created AFTER the initial load, just not for the one that actually opened the app itself.
Any advice would be brilliant!
Thanks!
You should be creating your AppleEvent handlers in -applicationWillFinishLaunching: instead.
The idea is to have your handlers ready to go before your application begins processing AppleEvents.