Skip to content
Snippets Groups Projects
Commit 5cde7b72 authored by mattwire's avatar mattwire
Browse files

Fix saving available_on date

parent 42a8f480
Branches
Tags
1 merge request!217Implement Stripe Checkout (with support for SEPA and ACH)
......@@ -202,7 +202,7 @@ class CRM_Stripe_Api {
*
* @return string|null
*/
private static function formatDate($stripeTimestamp) {
public static function formatDate($stripeTimestamp) {
return $stripeTimestamp ? date('YmdHis', $stripeTimestamp) : NULL;
}
......
......@@ -208,7 +208,7 @@ class Events {
->getFeeFromBalanceTransaction($balanceTransaction, $this->getValueFromStripeObject('currency', 'String'));
return [
'fee_amount' => $fee,
'available_on' => $balanceTransaction->available_on,
'available_on' => \CRM_Stripe_Api::formatDate($balanceTransaction->available_on),
'exchange_rate' => $balanceTransaction->exchange_rate,
'payout_amount' => $balanceTransaction->amount / 100,
'payout_currency' => $balanceTransaction->currency,
......
......@@ -19,7 +19,7 @@ if (!empty($customGroup)) {
'name' => 'CustomGroup_Payment_details_CustomField_available_on',
'entity' => 'CustomField',
'cleanup' => 'never',
'update' => 'always',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
......@@ -58,15 +58,15 @@ if (!empty($customGroup)) {
],
],
[
'name' => 'CustomGroup_Payment_details_CustomField_Exchange_Rate',
'name' => 'CustomGroup_Payment_details_CustomField_exchange_rate',
'entity' => 'CustomField',
'cleanup' => 'never',
'update' => 'always',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
'custom_group_id.name' => 'Payment_details',
'name' => 'Exchange_Rate',
'name' => 'exchange_rate',
'label' => E::ts('Exchange Rate'),
'data_type' => 'Float',
'html_type' => 'Text',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment