Stripe Payment: Rollback stipe-php from 20.0.0 back to 19.4.1 to fix a isses with adding saved paymentss, Stripe updated their API in which we will update to a later date

This commit is contained in:
johnnyq
2026-05-04 12:32:12 -04:00
parent a6d996b83f
commit 0cdb780b88
159 changed files with 281 additions and 908 deletions

View File

@@ -296,16 +296,6 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
$values = $values->toArray();
}
// Apply int64_string response coercion on raw values before hydration.
// V2 resource classes declare fieldEncodings() with metadata about which
// fields are int64_string (wire format: JSON string, SDK type: PHP int).
if (\method_exists(static::class, 'fieldEncodings')) {
$encodings = static::fieldEncodings();
if (!empty($encodings)) {
$values = Util\Int64::coerceResponseValues($values, $encodings);
}
}
// Wipe old state before setting new. This is useful for e.g. updating a
// customer, where there is no persistent card parameter. Mark those values
// which don't persist as transient
@@ -341,8 +331,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
// This is necessary in case metadata is empty, as PHP arrays do
// not differentiate between lists and hashes, and we consider
// empty arrays to be lists.
// The same applies to the previous_attributes attribute.
if (('metadata' === $k || 'previous_attributes' === $k) && \is_array($v)) {
if (('metadata' === $k) && \is_array($v)) {
$this->_values[$k] = StripeObject::constructFrom($v, $opts, $apiMode);
} else {
$this->_values[$k] = Util\Util::convertToStripeObject($v, $opts, $apiMode);