Skip to content

Commit

Permalink
feat(applePay): add requirement for email in applePay paymentSheet flow
Browse files Browse the repository at this point in the history
feat(): change package name

feat(): change package name in various files, bump version

feat(): prepare for new pubish

feat(): rename files, bump version
  • Loading branch information
nikos9413 authored and masimplo committed Aug 28, 2024
1 parent 7b3a81e commit bf8387f
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@capacitor-community/stripe",
"name": "@covve/capacitor-stripe",
"version": "6.2.1",
"engines": {
"node": ">=18.0.0"
Expand All @@ -8,7 +8,7 @@
"private": false,
"description": "Stripe SDK bindings for Capacitor Applications",
"scripts": {
"release": "np --no-tests --no-publish && node ./release.js"
"release": "np --no-tests --no-publish --any-branch && node ./release.js"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = 'CapacitorCommunityStripeIdentity'
s.name = 'CovveCapacitorStripeIdentity'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
Expand Down
2 changes: 1 addition & 1 deletion packages/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"android/build.gradle",
"dist/",
"ios/Plugin/",
"CapacitorCommunityStripeIdentity.podspec"
"CovveCapacitorStripeIdentity.podspec"
],
"author": "Masahiko Sakakibara",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = 'CapacitorCommunityStripe'
s.name = 'CovveCapacitorStripe'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Foundation
import Capacitor
import StripePaymentSheet
import PassKit

class PaymentSheetExecutor: NSObject {
weak var plugin: StripePlugin?
Expand Down Expand Up @@ -54,7 +55,15 @@ class PaymentSheetExecutor: NSObject {
if call.getBool("enableApplePay", false) && applePayMerchantId != "" {
configuration.applePay = .init(
merchantId: applePayMerchantId,
merchantCountryCode: call.getString("countryCode", "US")
merchantCountryCode: call.getString("countryCode", "US"),
customHandlers: .init(
paymentRequestHandler: { (req: PKPaymentRequest) -> PKPaymentRequest in
var contactFieldArray: [PKContactField] = []
contactFieldArray.append(.emailAddress)
req.requiredShippingContactFields = Set(contactFieldArray)
return req
}
)
)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/payment/ios/Plugin/StripePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class StripePlugin: CAPPlugin {
STPAPIClient.shared.stripeAccount = stripeAccount
}

STPAPIClient.shared.appInfo = STPAppInfo(name: "@capacitor-community/stripe", partnerId: nil, version: nil, url: nil)
STPAPIClient.shared.appInfo = STPAppInfo(name: "@covve/capacitor-stripe", partnerId: nil, version: nil, url: nil)

call.resolve()
}
Expand Down
4 changes: 2 additions & 2 deletions packages/payment/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/payment/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@capacitor-community/stripe",
"name": "@covve/capacitor-stripe",
"version": "6.2.1",
"engines": {
"node": ">=18.0.0"
Expand All @@ -26,7 +26,7 @@
"dist/",
"src/",
"ios/Plugin/",
"CapacitorCommunityStripe.podspec"
"CovveCapacitorStripe.podspec"
],
"author": "Masahiko Sakakibara <[email protected]>",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/payment/src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class StripeWeb extends WebPlugin implements StripePlugin {
this.paymentSheet.stripeAccount = this.stripeAccount;
}

this.paymentSheet.applicationName = '@capacitor-community/stripe';
this.paymentSheet.applicationName = '@covve/capacitor-stripe';

this.paymentSheet.intentClientSecret = options.paymentIntentClientSecret;
this.paymentSheet.intentType = 'payment';
Expand Down Expand Up @@ -140,7 +140,7 @@ export class StripeWeb extends WebPlugin implements StripePlugin {
this.paymentSheet.stripeAccount = this.stripeAccount;
}

this.paymentSheet.applicationName = '@capacitor-community/stripe';
this.paymentSheet.applicationName = '@covve/capacitor-stripe';

// eslint-disable-next-line no-prototype-builtins
if (options.hasOwnProperty('paymentIntentClientSecret')) {
Expand Down Expand Up @@ -293,7 +293,7 @@ export class StripeWeb extends WebPlugin implements StripePlugin {
requestButton.stripeAccount = this.stripeAccount;
}

requestButton.applicationName = '@capacitor-community/stripe';
requestButton.applicationName = '@covve/capacitor-stripe';
return await requestButton.isAvailable(type).finally(() => requestButton.remove());
}

Expand All @@ -310,7 +310,7 @@ export class StripeWeb extends WebPlugin implements StripePlugin {
requestButton.stripeAccount = this.stripeAccount;
}

requestButton.applicationName = '@capacitor-community/stripe';
requestButton.applicationName = '@covve/capacitor-stripe';

return requestButton;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = 'CapacitorCommunityStripeTerminal'
s.name = 'CovveCapacitorStripeTerminal'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
Expand Down
2 changes: 1 addition & 1 deletion packages/terminal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"android/build.gradle",
"dist/",
"ios/Plugin/",
"CapacitorCommunityStripeTerminal.podspec"
"CovveCapacitorStripeTerminal.podspec"
],
"author": "Masahiko Sakakibara",
"license": "MIT",
Expand Down

0 comments on commit bf8387f

Please sign in to comment.