concretecms-community-store / community_store_stripe

Stripe payment add-on for Community Store for concrete5
MIT License
7 stars 2 forks source link

Order ID in Stripe #9

Open cahueya opened 7 years ago

cahueya commented 7 years ago

Can anybody with knowledge of the Stripe API point out on how and where to add the current order ID so that it would be displayed in Stripe dashboard? Currently it is a fiddling task to identify the orders/payments.

Mesuva commented 7 years ago

The challenge here is that when an order is placed using Stripe, it has to process the charge successfully before the order is created, and therefore there's an order ID available.

From memory you can search in Stripe's dashboard via email addresses (as they are passed across), or via the transaction ID which you'll see against orders and on emails.

dbuonomo commented 7 years ago

Once the Community Store order ID is created (e.g. successful payment), you could send another API request to Stripe to update the payment record to add the order ID as meta-data. One place to generate that request is from the on_community_store_payment_complete event handler.

Edit: unfortunately, the order ID will not be listed as a column in the list of Stripe payments, and I don't think there is a way to search meta-data. I could be wrong about that.

Mesuva commented 7 years ago

Good point @dbuonomo, that would be the way to do it!