• Hi!

    I’m trying (together with a freelance developer) to create a WordPress/Woocommerce script to accept Postback data from epoch.com

    Epoch is Payment Gateway Provider I want to connect to with my Woocommerce store.

    Epoch does not have an API or extensive documentation.

    They only document they provide is: https://drive.google.com/file/d/1tOEWncYe1aZ0X0Oe-7petqGR22zUrrnW

    And for the first step in the integration/sign up process they ask us to provide them with an URL which accepts Postback data.

    The Post data they will send would look something like this:

    address=&amount=10.00&ans=Y003226ZM+%2C12454fsdffds078%2CCAPTURED%7C24546405&country=US&currency=USD&email=johndoe%40aol.com&event_datetime=2021-03-03+21%3A24%3A04&ipaddress=107.85.132.12&localamount=10,00&member_id=2424242424&name=JohnDoe&order_id=24242424245&password=jlmjdfdsf4&payment_subtype=VS&payment_type=CC&phone=&pi_code=PI_CODE&postalcode=90405&reseller=a&session_id=jkfsdfds4ds564dfg&trans_amount=10.00&trans_amount_usd=10.00&trans_currency=USD&transaction_id=12234589&username=ljljdqds&epoch_digest=7932llqdhjqlkdf5sd7889dfgdfljsdf5

    Now my developer and myself are completely lost in how to create a script like this that works in WordPress and in the end will be part of a fully custom Woocommerce Payment Plugin that works on my Store and can handle payment transactions with Epoch.

    Epoch support keeps on asking me to just provide the URL to them so they can finish the set-up.

    Any advice or pointers would be really helpful.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    What are you expected to do with that data? If it’s some sort of confirmation of sign up it’s not that clear. Let’s assume that’s the case for the sake of example. Create a sign up confirmation page, “signup-confirm” or similar. Provide the permalink of that page as the post back URL.

    Create a custom page template named page-signup-confirm.php which contains code necessary to process the returned data and display appropriate messaging to the user. Same concept applies for whatever the data’s purpose is.

    Important: when you post topics linking to your porn site, you must mark it as [NSFW] (the mature content checkbox near the bottom of the new topic form). I marked it for you this time.

    Thread Starter ngpentertainment

    (@ngpentertainment)

    Hi @bcworkz

    Sorry, and thank you for marking the post.

    The Payment Gateway Provider will POSTback the data of the transaction to the script/URL so we can show the ‘confirmation page’ on the Woocommerce store.

    So it needs to talk back to Woocommerce about the status of the payment and display the correct page accordingly and give users access to a downloadable product.

    Thank you so much for replying.

    Are there any other instructions I can share with my developer?

    Best regards,

    Moderator bcworkz

    (@bcworkz)

    What they’d need to know depends on what they already know 🙂 There are a few options for relating a page template to a particular page:
    https://developer.ww.wp.xz.cn/themes/template-files-section/page-template-files/

    If your theme is subject to periodic updates, custom template files should be kept in a child theme (along with any other custom work):
    https://developer.ww.wp.xz.cn/themes/advanced-topics/child-themes/

    It’s possible to get templates in a plugin used for a particular page through actions or filters applied from /wp-includes/template-loader.php

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[NSFW] Create a Payment Plugin from scratch with a script to accept postback data’ is closed to new replies.