Stripe V3 SCA

Open to all! Ask other shopowners for help.
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 12 times
Been thanked: 11 times

Re: Stripe V3 SCA

Post by mhsuffolk »

Test 1.0.8.0 shop on PHP 7.4 XAMPP
When installing Version 1.2.0 I get "This module has an unmet dependency. zone_id." and it does not install
I am using database from my 1.0.5.1 live store but with 1.0.8.0 configuration tables


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Stripe V3 SCA

Post by ecartz »

mhsuffolk wrote: Sun Mar 21, 2021 1:24 pm Test 1.0.8.0 shop on PHP 7.4 XAMPP
When installing Version 1.2.0 I get "This module has an unmet dependency. zone_id." and it does not install
I am using database from my 1.0.5.1 live store but with 1.0.8.0 configuration tables
Turn on the cd_state customer data module? Or something else that provides zone_id.
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 12 times
Been thanked: 11 times

Re: Stripe V3 SCA

Post by mhsuffolk »

ecartz wrote: Sun Mar 21, 2021 1:40 pm Turn on the cd_state customer data module? Or something else that provides zone_id.
Thank you, that has worked but I do not want to show the "State" box in the sign up pages, can I untick them all?
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: Stripe V3 SCA

Post by raiwa »

@ecartz,
Would it have a side effect removing zone_id and the other, now optional, modules from the REQUIRES list?

Code: Select all

    const REQUIRES = [ 'name', 'email_address', 'id' ];
@mhsuffolk
if Matt agrees, you could modify line 18 in the module to above
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Stripe V3 SCA

Post by ecartz »

raiwa wrote: Sun Mar 21, 2021 2:26 pm Would it have a side effect removing zone_id and the other, now optional, modules from the REQUIRES list?
Not if they're really optional now. I admit when I added them there, I didn't check if they were optional or not beyond looking at code like

Code: Select all

        $address = [
          'address_line1' => $order->billing['street_address'],
          'address_city' => tep_output_string($order->billing['city']),
          'address_zip' => tep_output_string($order->billing['postcode']),
          'address_state' => tep_output_string(tep_get_zone_name($order->billing['country_id'], $order->billing['zone_id'], $order->billing['state'])),
          'address_country' => tep_output_string($order->billing['country']['iso_code_2']),
        ];
Where it is clearly used regardless. If Stripe is happy without them, then there is nothing outside the module that will care whether the module uses them or not.
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: Stripe V3 SCA

Post by raiwa »

This snippet has been changed in the latest version to:

Code: Select all

        $address = [
          'address_line1' => $GLOBALS['customer_data']->get('street_address', $order->billing),
          'address_city' => $GLOBALS['customer_data']->get('city', $order->billing),
          'address_zip' => $GLOBALS['customer_data']->get('postcode', $order->billing),
          'address_state' => $GLOBALS['customer_data']->get('state', $order->billing),
          'address_country' => $GLOBALS['customer_data']->get('country_iso_code_2', $order->billing),
        ];

        foreach ($address as $k => $v) {
            $content .= '<input type="hidden" id="' . Text::output($k) . '" value="' . Text::output($v ?? '') . '" />';
        }
And testing it without state module it doesn't throw errors. So I believe it should be save to remove them.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: Stripe V3 SCA

Post by raiwa »

I finally only removed state_id because the other modules are required in core checkout and it would need anyway more adjustments in core for not to use them.

Updated to Version: 1.2.1:
https://www.oscaddons.com/en/free-add-o ... -p-78.html

- Removed zone_id from the requires list to allow installation without state module.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 12 times
Been thanked: 11 times

Re: Stripe V3 SCA

Post by mhsuffolk »

Thanks @raiwa @ecartz, I discovered that once I got it installed I turned off the State field and Stripe still works perfectly.
admin
Contributor
Posts: 217
Joined: Wed Oct 30, 2019 1:34 pm
Phoenix Version:
Has thanked: 20 times
Been thanked: 22 times

Re: Stripe V3 SCA

Post by admin »

Support for this Addon will now be available on the Addon page - app.php/addons/free_addon/stripe_payment/support


Join The Code Co-op to get access to your library in the Code Co-op Forum
Locked