Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ module.exports = async function stripeToCrystallizeOrderModel({
const { getClient } = require("./utils");

const paymentIntent = await getClient().paymentIntents.retrieve(
paymentIntentId
paymentIntentId, {
expand: ['latest_charge']
}
);

const { data } = paymentIntent.charges;
const charge = data[0];
const charge = paymentIntent.latest_charge;

const customerName = charge.billing_details.name.split(" ");
let email = charge.receipt_email;
Expand Down