Hii everyone, I'm trying to use the Stripe payment gateway, but when I try to create an order payment using the
https://example.com/api/orders/{order_number}/payments endpoint that Solidus provided, where I pass request like:-
{
"payment": {
"amount": "42.42",
"payment_method_id": 2
}
}
I get a response saying that the source can't be blank.
when I try to pass the request as:-
{
"payment": {
"amount": "42.42",
"payment_method_id": 2,
"source_attributes": {
"cc_type": "Visa",
"gateway_customer_profile_id": 2,
"gateway_payment_profile_id": 1,
"last_digits": "242",
"month": 12,
"name": "Test Roney",
"year": "2028",
"number": "4242424242424242"
}
}
}
then I am seeing an issue similar to this: SolidusStripe:
PaymentSourceActiveModel:UnknownAttributeError (unknown attribute 'cc_type'), for all the source_attributes. Could you kindly explain to me how to pass source_attributes in the payment api for all the parameters that I am sending in source_attributes?