mirror of
https://github.com/itflow-org/itflow
synced 2026-05-05 18:57:47 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user