• Home
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • App Market Developer Platform
  • Clover GO
  • Ideas & Feedback
  • Semi-Integration
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
Skip to main content
  • Create
    • Ask a question
    • Post an idea
    • App Market Developer Platform
    • Clover GO
    • Ideas & Feedback
    • Semi-Integration
    • Topics
    • Questions
    • Articles
    • Ideas
  • Sign in
  • Home
  • Semi-Integration
This question was closed Apr 02 at 09:45 PM by Clover_Community_Bot for the following reason: automated

question

Clover_FAQ avatar image
Clover_FAQ asked · Oct 26, 2017 at 11:03 PM

How can I tell whether a Partial Auth has occurred?

How can I tell whether a Partial Auth has occurred?
FAQ
Comment
0
10 |2000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

1 Answer

Clover_FAQ avatar image
Clover_FAQ answered · Oct 26, 2017 at 11:13 PM ACCEPTED ANSWER Locked
To find out whether a partial authorization has occurred, compare the payment response amount with the payment request amount. If they differ, the customer was only able to pay a portion of the sale. If this is the case, you'll need to complete the sale, then issue a second sale for the remaining amount.

//Create a Sale with a specific amount
var pendingSale = new SaleRequest();
pendingSale.ExternalId = ExternalIDUtil.GenerateRandomString(13);
pendingSale.Amount = 100000;
totalAmount = pendingSale.Amount;
pendingSale.AutoAcceptSignature = true;
pendingSale.DisableDuplicateChecking = true;
cloverConnector.Sale(pendingSale);
//In your DefaultCloverConnectorListener implementation
public override void OnSaleResponse(SaleResponse response)
{
   base.OnSaleResponse(response);
   totalAmount -= response.Payment.amount;
   if (totalAmount != 0)
   {
      Console.WriteLine("Partial auth was taken.");
      //Handle however you find suitable
   }
}
A partial auth also occurs when the CONFIRM_PARTIAL_AUTH deviceEvent starts.

ExampleCloverConnectorListener.prototype.onDeviceActivityStart = function(deviceEvent) {
  if (deviceEvent.eventState === clover.remotepay.DeviceEventState.CONFIRM_PARTIAL_AUTH) {
    // then a partial auth occured
      }
    }
  }
}
0 · Share
10 |2000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

question details

1 Person is following this question.

rachel follows this question
Answers Subscribe to Answers Answers and Comments Subscribe to Comments and Answers

Related Questions

Do you have example connectors for REST and WebSockets? 1 Answer

My merchants are unable to install the Pay Display apps. What can I do? 1 Answer

Do you have Java SDKs? 1 Answer

How can I set my test merchant's batch processing to manual OR automatic? 1 Answer

Do you support pay-at-the-table? 1 Answer

Answerhub Logo
  • About
  • ·
  • FAQ
  • ·
  • Privacy
  • ·
  • Copyright © 2010-19 DZone, Inc.