Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Venmo as payment option #138

Merged

Commits on Dec 2, 2021

  1. Replace payment_method_spec instance_double Order with build_stubbed

    To reduce having unnecessary information on tests that do not explicitly
    involve Spree::Order checkout steps.
    RyanofWoods committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    d22dd9d View commit details
    Browse the repository at this point in the history
  2. Allow control over Venmo PayPal financing option

    Resolves issue/ticket:
    - solidusio#136
    
    If a transaction meets Venmo prerequisites [1], then Venmo button
    should appear already on checkout, cart and product page depending
    on payment method preferences.
    
    These changes is to give more control to the developer so that they can
    disable Venmo by setting the `enable_venmo` to false.
    https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-configuration/#disable-funding
    
    As it Venmo may have already been showing for developers, the default
    was set to true.
    
    The enable-funding option is now also sent over to ensure that the Venmo
    button gets rendered if eligible:
    https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-configuration/#enable-funding
    https://developer.paypal.com/docs/business/checkout/pay-with-venmo/integrate-pay-with-venmo/#always-request-venmo
    
    [1] https://developer.paypal.com/docs/business/checkout/pay-with-venmo/#eligibility
    RyanofWoods committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    5f5baef View commit details
    Browse the repository at this point in the history
  3. Add force_buyer_country payment method preference for testing

    Resolves issue/ticket:
    - solidusio#137
    
    Usually on checkout, PayPal will look at the buyer's location by their
    ip and determine which funding sources are available to them. For
    example, allow Venmo as an option for US buyers, but not for others.
    
    With this new preference, you can set a country to override the buyer
    location. Allowing you on non-production environments to see the
    different funding sources for different customers and its integration.
    
    This preference is still available on production but has no effect.
    It was kept on production to not have differences between the
    environments. Otherwise, errors could easily occur on production if
    for example, preferred_force_buyer_country method was incorrectly
    called.
    
    More information:
    https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-configuration/#buyer-country
    RyanofWoods committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    2498c7e View commit details
    Browse the repository at this point in the history