question

mohitkanada avatar image
mohitkanada asked matteobklyn published

Is there any notification to get Clover Register Pay Event ?

Is there any clover notification to get Clover Register app Pay Button's click.

I am trying to add my event once user click Register Pay Button. Once transaction is done I need to redirect user to clover's payment screen.
PaymentsBroadcasts
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Miguel avatar image
Miguel Deactivated answered
There's not a broadcast for when the pay button is pressed. The ACTION_ORDER_SAVED broadcast is fired when the save button is pressed. Alternatively, ACTION_PAYMENT_PROCESSED is fired when a payment is successfully processed. You can view all the Clover broads here: https://clover.github.io/clover-android-sdk/com/cl...

As mentioned in our guide for asking questions, I would recommend providing additional context of what you are trying to accomplish so others can provide additional possible workarounds.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mohitkanada avatar image
mohitkanada answered mohitkanada commented
Thanks @Miguel I am trying to achieve that once user clicks on Register Pay Button our app will be open with dialog activity, as per the user selection do process and apply changes to order and redirect user to register app again
As per your suggestion I am trying to implement Broadcast Receiver for Payment successfully processed event. I think I added all required code but still I am not getting event of Payment Processed on OnReceiver of Broadcast Receiver. Here below is code snippet I used. Let me know If I missed anything.
In Manifest file I added below:
<receiver android:name=".MyBroadcastReceiver" android:exported="true">
<intent-filter>
	<action android:name="com.clover.sdk.v1.Intents.ACTION_PAYMENT_PROCESSED" />
</intent-filter>
</receiver>
I added Broadcast Receiver as below
public class MyBroadcastReceiver extends BroadcastReceiver {    
@Override public void onReceive(Context context, Intent intent) {        
	String log = ""+intent.getAction();
        Log.d("Receiver", log);    
}}
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mohitkanada avatar image mohitkanada commented ·

I found issue
Issue is in intent filter. Correct one we need to use is as below :
com.clover.intent.action.PAYMENT_PROCESSED

1 Like 1 ·
matteobklyn avatar image
matteobklyn answered matteobklyn published
Did you find any solution?
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community