Details
Description
Look into updating Stripe Payments to update the API library to use the latest version of their API.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Rank | Ranked higher |
| Sprint | 5.9.0 Sprint 4 [ 187 ] |
| Assignee | Jonathan Reissmueller [ jonathan ] |
| Remaining Estimate | 0 minutes [ 0 ] | |
| Time Spent | 1 hour, 21 minutes [ 4860 ] | |
| Worklog Id | 16657 [ 16657 ] |
| Status | Open [ 1 ] | In Review [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Time Spent | 1 hour, 21 minutes [ 4860 ] | 1 hour, 41 minutes [ 6060 ] |
| Worklog Id | 16668 [ 16668 ] |
| Status | In Review [ 5 ] | Closed [ 6 ] |
We'll want to explicitly target an api version. The code below targets the currently compatible version but we can update the gateway to handle a more recent version and update to target it.
In components/gateways/merchant/stripe_payments/stripe_payments.php change
/** * Loads the API if not already loaded */ private function loadApi() { Loader::load(dirname(__FILE__) . DS . 'vendor' . DS . 'stripe' . DS . 'stripe-php' . DS . 'init.php'); Stripe\Stripe::setApiKey((isset($this->meta['secret_key']) ? $this->meta['secret_key'] : null)); // Include identifying information about this being a gateway for Blesta Stripe\Stripe::setAppInfo('Blesta ' . $this->getName(), $this->getVersion(), 'https://blesta.com'); }To
/** * Loads the API if not already loaded */ private function loadApi() { Loader::load(dirname(__FILE__) . DS . 'vendor' . DS . 'stripe' . DS . 'stripe-php' . DS . 'init.php'); Stripe\Stripe::setApiKey((isset($this->meta['secret_key']) ? $this->meta['secret_key'] : null)); // Include identifying information about this being a gateway for Blesta Stripe\Stripe::setAppInfo('Blesta ' . $this->getName(), $this->getVersion(), 'https://blesta.com'); // Set API version Stripe\Stripe::setApiVersion('2022-08-01'); }