#memekyTeam

1 messages ยท Page 1 of 1 (latest)

river crescentBOT
glossy fossil
#

What am I doing wrong, thanks?

vivid willow
glossy fossil
#

I think I have explained myself badly.
I want to know through the api this information

#

$intent = \Stripe\PaymentIntent::retrieve('pi_3MMXAwFX2ddxx3Qo1hCKmRCX');

$latest_charge = $intent->latest_charge;

$time = $stripe->charges->retrieve(
$latest_charge,
['expand' => ['latest_charge.balance_transaction.available_on']]
);

$paymentMethod = $time->latest_charge->balance_transaction->available_on;

#

The $time function is wrong, can you write it to tell me when I will receive that payment as shown in the image?

vivid willow
#

So once you retrieve the charge and the balance transaction

$latest_charge,
['expand' => ['latest_charge.balance_transaction']]
);```
#

you'll want to look at the charge->balance_transaction['available_on'] property

glossy fossil
#

sorry for the language we are from spain and sometimes we don't translate well

vivid willow
#

my PHP skills are not that great

#

but you may get the idea from the example above

glossy fossil
#

no problem you helped me a lot

#

one last question

vivid willow
#

Sure thing!

glossy fossil
#

I can pass this value to 3-24-2022 15:00:23 or how do I interpret it? What is it ??

#

*3-04-2023 15:00:23

vivid willow
#

that is a UNIX timestamp

#

in epoch format

glossy fossil
#

let unix_timestamp = 1549312452
// Create a new JavaScript Date object based on the timestamp
// multiplied by 1000 so that the argument is in milliseconds, not seconds.
var date = new Date(unix_timestamp * 1000);
// Hours part from the timestamp
var hours = date.getHours();
// Minutes part from the timestamp
var minutes = "0" + date.getMinutes();
// Seconds part from the timestamp
var seconds = "0" + date.getSeconds();

// Will display time in 10:30:23 format
var formattedTime = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);

#

ok I found this I think it will help

#

thanks for everything it has helped me a lot

vivid willow
#

NP! ๐Ÿ™‚ Glad I could help

glossy fossil
#

have a nice day excellent service ๐Ÿ™‚

vivid willow
#

You too! ๐Ÿ˜„ Good Luck