lennon70 Posted September 18, 2017 Share Posted September 18, 2017 Hola a tod@s, Mi nombre es Alberto y me gustaría saber como puedo integrar un método de pago vía API, ya que tengo un formulario POST y no sé de dónde obtener la información para rellenar el formulario y que objetos debo utilizar. Gracias. el formulario es:<form action="http://empresa.com/formapi/submit" method="post"><!-- Configuration parameters --><input name="account_id" type="hidden" value="CFG_STORE_ACCOUNT_ID" /><input name="signature" type="hidden" value="CFG_SIGNATURE" /><input name="ok_url" type="hidden" value="CFG_URL_OK" /><input name="nok_url" type="hidden" value="CFG_URL_NOK" /><input name="cancelled_url" type="hidden" value="CFG_CANCELLED_URL" /><input name="callback_url" type="hidden" value="CFG_CALLBACK_URL" /><input name="locale_code" type="hidden" value="CFG_LOCALE_CODE" /><input name="sandbox_mode" type="hidden" value="CFG_SANDBOX_MODE" /><!-- Order details --><input name="order[id]" type="hidden" value="ORD_ORDER_ID" /><input name="order[payment_method]" type="hidden" value="ORD_PAYMENT_METHOD" /><input name="order[currency_code]" type="hidden" value="ORD_CURRENCY_CODE" /><input name="order[shipping_method_code]" type="hidden" value="ORD_SHIPPING_METHOD_CODE" /><input name="order[shipping_method_title]" type="hidden" value="ORD_SHIPPING_METHOD_TITLE" /><input name="order[subtotal_with_tax]" type="hidden" value="ORD_SUBTITLE_WITH_TAX" /><input name="order[subtotal]" type="hidden" value="ORD_SUBTOTAL" /><input name="order[tax]" type="hidden" value="ORD_TAX" /><input name="order[shipping_with_tax]" type="hidden" value="ORD_SHIPPING_WITH_TAX" /><input name="order[shipping]" type="hidden" value="ORD_SHIPPING" /><input name="order[discount]" type="hidden" value="ORD_DISCOUNT" /><input name="order[shipping_discount]" type="hidden" value="ORD_SHIPPING_DISCOUNT" /><input name="order[total]" type="hidden" value="ORD_TOTAL" /><input name="order[total_items]" type="hidden" value="ORD_TOTAL_ITEMS" /><!-- Item details --><input name="items[n][item_id]" type="hidden" value="ITM_ITEM_ID" /><input name="items[n][product_id]" type="hidden" value="ITM_PRODUCT_ID" /><input name="items[n][name]" type="hidden" value="ITM_NAME" /><input name="items[n]" type="hidden" value="ITM_URL" /><input name="items[n][details]" type="hidden" value="ITM_DETAILS" /><input name="items[n][details_full]" type="hidden" value="ITM_DETAILS_FULL" /><input name="items[n][sku]" type="hidden" value="ITM_SKU" /><input name="items[n][image_url]" type="hidden" value="ITM_IMAGE_URL" /><input name="items[n][virtual]" type="hidden" value="ITM_VIRTUAL" /><input name="items[n][quantity]" type="hidden" value="ITM_QUANTITY" /><input name="items[n][quantity_decimal]" type="hidden" value="ITM_QUANTITY_DECIMAL" /><input name="items[n][item_subtotal_with_tax]" type="hidden" value="ITM_SUBTOTAL_WITH_TAX" /><input name="items[n][item_subtotal]" type="hidden" value="ITM_SUBTOTAL" /><input name="items[n][item_tax]" type="hidden" value="ITM_TAX" /><input name="items[n][item_tax_before_discount]" type="hidden" value="ITM_TAX_BEFORE_DISCOUNT" /><input name="items[n][item_shipping_with_tax]" type="hidden" value="ITM_SHIPPING_WITH_TAX" /><input name="items[n][item_shipping]" type="hidden" value="ITM_SHIPPING" /><input name="items[n][item_total_before_discount]" type="hidden" value="ITM_TOTAL_BEFORE_DISCOUNT" /><input name="items[n][item_discount]" type="hidden" value="ITM_DISCOUNT" /><input name="items[n][item_discount_with_tax]" type="hidden" value="ITM_DISCOUNT_WITH_TAX" /><input name="items[n][item_total]" type="hidden" value="ITM_TOTAL" /><input name="items[n][item_total_with_tax]" type="hidden" value="ITM_TOTAL_WITH_TAX" /><!-- Customer details --><input name="customer[id]" type="hidden" value="CUST_CUSTOMER_ID" /><input name="customer[guest]" type="hidden" value="CUST_IS_GUEST" /><input name="customer[username]" type="hidden" value="CUST_USERNAME" /><input name="customer[created_on]" type="hidden" value="CUST_CREATED_ON" /><input name="customer[locale_code]" type="hidden" value="CUST_LOCALE_CODE" /><input name="customer[birthdate]" type="hidden" value="CUST_BIRTHDATE" /><input name="customer" type="hidden" value="CUST_EMAIL" /><input name="customer[title]" type="hidden" value="CUST_TITLE" /><input name="customer[prefix]" type="hidden" value="CUST_PREFIX" /><input name="customer[suffix]" type="hidden" value="CUST_SUFFIX" /><input name="customer[first_name]" type="hidden" value="CUST_FIRST_NAME" /><input name="customer[middle_name]" type="hidden" value="CUST_MIDDLE_NAME" /><input name="customer[last_name]" type="hidden" value="CUST_LAST_NAME" /><input name="customer[company_name]" type="hidden" value="CUST_COMPANY_NAME" /><input name="customer[gender]" type="hidden" value="CUST_GENDER" /><input name="customer[telephone1]" type="hidden" value="CUST_TELEPHONE1" /><input name="customer[telephone2]" type="hidden" value="CUST_TELEPHONE2" /><input name="customer[telephone3]" type="hidden" value="CUST_TELEPHONE3" /><input name="customer[fax]" type="hidden" value="CUST_FAX" /><input name="customer[vat_number]" type="hidden" value="CUST_VAT_NUMBER" /><input name="customer[document_number]" type="hidden" value="CUST_DOCUMENT_NUMBER" /><input name="customer[document_type]" type="hidden" value="CUST_DOCUMENT_TYPE" /><!-- Customer details --><input name="address[n][id]" type="hidden" value="ADR_ADDRESS_ID" /><input name="address[n][type]" type="hidden" value="ADR_TYPE" /><input name="address[n][title]" type="hidden" value="ADR_TITLE" /><input name="address[n][prefix]" type="hidden" value="ADR_PREFIX" /><input name="address[n][suffix]" type="hidden" value="ADR_SUFFIX" /><input name="address[n][first_name]" type="hidden" value="ADR_FIRST_NAME" /><input name="address[n][middle_name]" type="hidden" value="ADR_MIDDLE_NAME" /><input name="address[n][last_name]" type="hidden" value="ADR_LAST_NAME" /><input name="address[n][company_name]" type="hidden" value="ADR_COMPANY_NAME" /><input name="address[n][street_address_1]" type="hidden" value="ADR_STREET_ADDRESS1" /><input name="address[n][street_address_2]" type="hidden" value="ADR_STREET_ADDRESS2" /><input name="address[n][street_address_3]" type="hidden" value="ADR_STREET_ADDRESS3" /><input name="address[n][street_address_4]" type="hidden" value="ADR_STREET_ADDRESS4" /><input name="address[n][city]" type="hidden" value="ADR_ADDRESS_CITY" /><input name="address[n][country_code]" type="hidden" value="ADR_ADDRESS_COUNTRY_CODE" /><input name="address[n][state]" type="hidden" value="ADR_ADDRESS_STATE" /><input name="address[n][region]" type="hidden" value="ADR_ADDRESS_REGION" /><input name="address[n][region_code]" type="hidden" value="ADR_ADDRESS_REGION_CODE" /><input name="address[n][zip_code]" type="hidden" value="ADR_ADDRESS_ZIP_CODE" /><input name="address[n][telephone1]" type="hidden" value="ADR_TELEPHONE1" /><input name="address[n][telephone2]" type="hidden" value="ADR_TELEPHONE2" /><input name="address[n][telephone3]" type="hidden" value="ADR_TELEPHONE3" /><input name="address[n][fax]" type="hidden" value="ADR_FAX" /><input name="address[n][vat_number]" type="hidden" value="ADR_VAT_NUMBER" /><input name="address[n][store_data]" type="hidden" value="CUSTOM_STORE_DATA" /><!-- Optional submission button --><input type="submit" value="Complete Order"/></form> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now