Force PKR currency to 2 decimals (#2603)

* Force PKR currency to 2 decimals

* Update CHANGELOG.md
This commit is contained in:
eurias-stripe 2023-05-25 12:12:41 -07:00 committed by GitHub
parent c8fac0d864
commit e681060c0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@
* [Changed] The private beta API for https://stripe.com/docs/payments/finalize-payments-on-the-server has changed:
* If you use `IntentConfiguration(..., confirmHandler:)`, the confirm handler now has an additional `shouldSavePaymentMethod: Bool` parameter that you should ignore.
* If you use `IntentConfiguration(..., confirmHandlerForServerSideConfirmation:)`, use `IntentConfiguration(..., confirmHandler:)` instead. Additionally, the confirm handler's first parameter is now an `STPPaymentMethod` object instead of a String id. Use `paymentMethod.stripeId` to get its id and send it to your server.
* [Fixed] Fixed PKR currency formatting.
## 23.8.0 2023-05-08
### Identity

View File

@ -22,7 +22,10 @@ class NSDecimalNumberStripeTest: XCTestCase {
"aud",
"sek",
"sgd",
// Special cases:
"cop",
"pkr",
]
private let noDecimalPointCurrencies = [

View File

@ -13,6 +13,7 @@ extension NSDecimalNumber {
// This maps the currency code to the number of decimal digits.
static let decimalCountSpecialCases = [
"COP": 2,
"PKR": 2,
]
@objc @_spi(STP) public class func stp_decimalNumber(