Skip to content

Commit

Permalink
Merge pull request #27 from google-pay/sca-compliance-changes
Browse files Browse the repository at this point in the history
Sca compliance changes
  • Loading branch information
LeSalamandre committed Sep 4, 2019
2 parents 60dbf6a + 6ae1984 commit 3f80ea0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ public class Constants {
"PAN_ONLY",
"CRYPTOGRAM_3DS");

/**
* Required by the API, but not visible to the user.
*
* @value #COUNTRY_CODE Your local country
*/
public static final String COUNTRY_CODE = "US";

/**
* Required by the API, but not visible to the user.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ private static JSONObject getTransactionInfo(String price) throws JSONException
JSONObject transactionInfo = new JSONObject();
transactionInfo.put("totalPrice", price);
transactionInfo.put("totalPriceStatus", "FINAL");
transactionInfo.put("countryCode", Constants.COUNTRY_CODE);
transactionInfo.put("currencyCode", Constants.CURRENCY_CODE);

return transactionInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ object Constants {
"PAN_ONLY",
"CRYPTOGRAM_3DS")

/**
* Required by the API, but not visible to the user.
*
* @value #COUNTRY_CODE Your local country
*/
const val COUNTRY_CODE = "US"

/**
* Required by the API, but not visible to the user.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ object PaymentsUtil {
return JSONObject().apply {
put("totalPrice", price)
put("totalPriceStatus", "FINAL")
put("countryCode", Constants.COUNTRY_CODE)
put("currencyCode", Constants.CURRENCY_CODE)
}
}
Expand Down

0 comments on commit 3f80ea0

Please sign in to comment.