Repository navigation
feat: instalments, one-click payment and lightbox on Thelia 3 themes - #26
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The front-office part of the module now works with Thelia 3 themes. The Smarty templates it rendered through the old
order-invoice.*hooks are gone. Those hooks were no longer subscribed, so under Flexy only the plain hosted page was left, and that page sent the buyer back to Thelia 2 addresses.MODULE_PAYMENT_GET_OPTIONS(grouppayplug_multi_payment, optionmulti_payment), within the configured amount range.pay()reads the buyer's choice from the session keypayment_module_option_choicesand ignores it once the setting is turned off. This replaces thethelia_order_paymentform extension.checkout.payment.extra) names the saved card (if it has not expired) and links to its deletion.layout.head.checkout-payment/layout.head.checkout-onepageloadform.latest.jsand a small vanilla script. When PayPlug is the chosen method, a click on the order button asks/checkout/payin the background and opens the payment URL in the lightbox. jQuery is no longer needed, and a double click does not place the order twice.getPaymentSuccessPageUrl()/getPaymentFailurePageUrl()instead of/order/placedand/order/failed, which no longer exist.Removed:
templates/frontOffice/default/PayPlugModule/*.html(3 files),Hook/FrontHookManager.php,EventListener/FormExtend/OrderFormListener.php. Version 3.2.0.Needs thelia-templates/flexy#300 for the options and the hook.
Verified
order_pay_plug_multi_paymentbefore the API call, and none when it is not ticked; the saved card is shown; in lightbox mode the library loads, and the order button sends one XHR request and opens the address returned in the lightbox (PayPlug library stubbed). PayPlug rejects the fake key, and the buyer is sent to/checkout/failed.