Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function handle_customer($db, $stripe, $customer)
- {
- $cust = $stripe->customers->retrieve($customer->id, []);
- $db->Query("BEGIN TRANSACTION;");
- $record = new StripeCustomer($db);
- $record->customer_id = $cust->id;
- $result = $record->Read();
- if ($result == null || count($result) == 0)
- {
- handle_customer_created($db, $cust);
- }
- else
- {
- handle_customer_update($db, $cust);
- }
- $db->Query("COMMIT;");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement