question

ramya avatar image
ramya asked ramya commented

How to stop partial payments in ACTION_SECURE_PAY?

Hi,

Is there any setting to stop partial payment in ACTION_SECURE_PAY?

PaymentsClover Station 2018
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered ramya commented

I don't think so, I think you will need to compare the amount in the result with the requested amount and either initiate a void or a new transaction for the difference. See https://docs.clover.com/docs/transaction-types#partial-authorizations-us-and-canada which is for Clover Connector but should also apply in your use case.

11 comments
10 |2000

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

ramya avatar image ramya commented ·

Hi David,

Have tried a void transaction but getting 403 App doesn't have required permission.

Is there any way to void transaction?

Used below code

orderConnector.voidPayment2(orderId,paymentId,"",reason,"");
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ ramya commented ·

You need to use Payment Connector, the Order Connector void API is only available to Clover apps (see the API documentation).

0 Likes 0 ·
ramya avatar image ramya David Marginian ♦♦ commented ·

Hi David,

I was unable to void payment using PaymentConnector in sandbox.

Have given permissions also.

Is there anything have to add? Can you please check it.


WeakReference<IPaymentConnector> cloverConnectorWeakReference;
IPaymentConnector paymentConnector;
paymentConnector = initializePaymentConnector();
cloverConnectorWeakReference = new WeakReference<IPaymentConnector>(paymentConnector);
private PaymentConnector initializePaymentConnector() {

    Account cloverAccount = CloverAccount.getAccount(this);

    String remoteApplicationId = "AW3H9WPYBBVH4.ZC7VX7HCC6862";

    IPaymentConnectorListener paymentConnectorListener = new IPaymentConnectorListener() {

        @Override
        public void onVoidPaymentResponse(VoidPaymentResponse response) {

        }
      
    };

  
    return new PaymentConnector(this, cloverAccount, paymentConnectorListener, remoteApplicationId);
}
VoidPaymentRequest voidPaymentRequest = new VoidPaymentRequest();
voidPaymentRequest.setOrderId(orderId);
voidPaymentRequest.setPaymentId(paymentId);
voidPaymentRequest.setVoidReason("REJECT_PARTIAL_AUTH");
final IPaymentConnector cloverConnector = cloverConnectorWeakReference.get();
cloverConnector.voidPayment(voidPaymentRequest);


0 Likes 0 ·
Show more comments
ramya avatar image
ramya answered ramya edited

Thank you for your response David. Will check it.

10 |2000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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