Skip to content

fix(sofa-checkout-service): Changed wrong paramater#8

Open
knitzie wants to merge 1 commit intosofa:renofrom
knitzie:patch-1
Open

fix(sofa-checkout-service): Changed wrong paramater#8
knitzie wants to merge 1 commit intosofa:renofrom
knitzie:patch-1

Conversation

@knitzie
Copy link

@knitzie knitzie commented Dec 16, 2014

The parameter checkoutModel.payment seems to be null during checkout, checkoutModel.selectedPaymentMethod is filled

The parameter checkoutModel.payment seems to be null during checkout, checkoutModel.selectedPaymentMethod is filled
@0x-r4bbit
Copy link
Contributor

@sofa anybody in charge for this? I think @CrashKid or @cburgdorf is familiar with the checkout.

@CrashKid
Copy link

As of cda03ab the payment parameter was an intended change. I'd like us to pass any model as clean as possible to the backend. And the selectedPaymentMethod is a mess...
Have a look at https://github.com/couchcommerce/private-sofa-app/blob/reno/src/app/checkout/CheckoutController.js#L244-L253 to see how I fill the new payment object

@0x-r4bbit
Copy link
Contributor

@CrashKid This link is private.

@CrashKid
Copy link

Sure it is. It was meant for @knitzie exclusively.
The solution is to pass a payment object, which has to look like this:

return {
    methodCode: 'code', // method code of the selected payment method
    methodDetails: {}, // selected payment method's extraField data (optional)
    successUrl: 'checkoutSuccessUrl', // (optional)
    errorUrl: 'checkoutErrorUrl' // (optional)
};

@knitzie
Copy link
Author

knitzie commented Dec 17, 2014

Ah ok, thanks for the advice @CrashKid :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants